Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-SSH2 CPAN distribution.

Report information
The Basics
Id:
106845
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
peter [...] dadeos.co.uk
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Unable to authenticate using only private key
Date: Thu, 3 Sep 2015 15:55:38 +0100 (BST)
To: bug-Net-SSH2@rt.cpan.org
From: Peter Stokes <peter@dadeos.co.uk>
Hi, I am attempting to use Net::SSH2 version 0.53 in a scenario where I only have access to the private key (i.e. I do not have convenient access to the associated public key), yet the Net::SSH2::auth_publickey() function, and associated Net::SSH2::auth() function, require the public key to be provided. It appears that the "publickey" parameter to the underlying call to "libssh2_userauth_publickey_fromfile_ex()" may be NULL when "libssh2 is built against OpenSSL" (see: http://www.libssh2.org/libssh2_userauth_publickey_fromfile_ex.html), as it is possible to generate the public key from the private key. However the parameter validation performed by the Net::SSH2::auth_publickey() and Net::SSH2::auth() functions appear to make it impossible to arrange for the "publickey" parameter passed to the call to "libssh2_userauth_publickey_fromfile_ex()" to be NULL. Would it be possible to modify Net::SSH2 in order to avoid the requirement to provide a public key file? (e.g. support "Net::SSH2::auth_publickey(username, undef, private key [, password]);" or similar). Thanks Peter
Subject: Re: [rt.cpan.org #106845] Unable to authenticate using only private key
Date: Sat, 5 Sep 2015 12:16:32 +0200
To: bug-Net-SSH2@rt.cpan.org
From: Salvador Fandiño <sfandino@yahoo.com>
On 09/03/2015 04:55 PM, Peter Stokes via RT wrote:
Show quoted text
> Thu Sep 03 10:55:52 2015: Request 106845 was acted upon. > Transaction: Ticket created by peter@dadeos.co.uk > Queue: Net-SSH2 > Subject: Unable to authenticate using only private key > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: peter@dadeos.co.uk > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106845 > > > > Hi, > > I am attempting to use Net::SSH2 version 0.53 in a scenario where I only have > access to the private key (i.e. I do not have convenient access to the > associated public key), yet the Net::SSH2::auth_publickey() function, and > associated Net::SSH2::auth() function, require the public key to be provided. > > It appears that the "publickey" parameter to the underlying call to > "libssh2_userauth_publickey_fromfile_ex()" may be NULL when "libssh2 is built > against OpenSSL" (see: > http://www.libssh2.org/libssh2_userauth_publickey_fromfile_ex.html), as it is > possible to generate the public key from the private key. However the parameter > validation performed by the Net::SSH2::auth_publickey() and Net::SSH2::auth() > functions appear to make it impossible to arrange for the "publickey" parameter > passed to the call to "libssh2_userauth_publickey_fromfile_ex()" to be NULL. > > Would it be possible to modify Net::SSH2 in order to avoid the requirement to > provide a public key file? (e.g. support "Net::SSH2::auth_publickey(username, > undef, private key [, password]);" or similar). > > Thanks > > Peter >
Peter, that feature is already included on the development version 0.54_01. https://metacpan.org/pod/release/SALVA/Net-SSH2-0.54_01/lib/Net/SSH2.pm Could you try it?
Subject: Re: [rt.cpan.org #106845] Unable to authenticate using only private key
Date: Mon, 7 Sep 2015 09:27:56 +0100 (BST)
To: "Salvador \\"Fandiño\\" via RT" <bug-Net-SSH2@rt.cpan.org>
From: Peter Stokes <peter@dadeos.co.uk>
On Sat, 5 Sep 2015, Salvador \"Fandiño\" via RT wrote:
Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=106845 > > > Peter, that feature is already included on the development version 0.54_01. > > https://metacpan.org/pod/release/SALVA/Net-SSH2-0.54_01/lib/Net/SSH2.pm > > Could you try it? > >
Hi Salvador, Sorry, I had not noticed the development release including this functionality; I have tried version 0.54_01 and it appears to behave as I would wish. Thanks! Peter


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.