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:
107382
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
sisyphus [...] cpan.org
Cc:
AdminCc:

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



Subject: [Win32] No dsa authorisation for me
As it stands, the t/Net-SSH2.t script that ships with 0.55 (and earlier) fails test 27 and terminates as shown in the attached fail.t.txt. If I change the script (at about lines 109 & 110) to use rsa authentication then the script passes test 27 and terminates as shown in the attached pass.t.txt - and this matches the output that I got with 0.53. NOTE: I edit t/Net-SSH2.t prior to building so that: 1) "my ($host, $user, $pass)" is set appropriately (line 16); 2) $ENV{HOME} is set to the location of my .ssh folder. $ENV{HOME} is unset on my Windows machine, and I think that's the usual thing on that OS. Hence the need for step 2) You'll note that, in both fail.t.txt and pass.t.txt there's also a deprecation warning in relation to test 27. Cheers, Rob
Subject: fail.t.txt
ok 26 - not authenticated yet Using the key 'password' to refer to a passphrase is deprecated. Use 'passphrase ' instead at t/Net-SSH2.t line 109. not ok 27 - authenticated via: # Failed test 'authenticated via: ' # at t/Net-SSH2.t line 113. ok 28 # skip - failed to authenticate with server ok 29 # skip - failed to authenticate with server ok 30 # skip - failed to authenticate with server ok 31 # skip - failed to authenticate with server ok 32 # skip - failed to authenticate with server ok 33 # skip - failed to authenticate with server ok 34 # skip - failed to authenticate with server ok 35 # skip - failed to authenticate with server ok 36 # skip - failed to authenticate with server ok 37 # skip - failed to authenticate with server ok 38 # skip - failed to authenticate with server ok 39 # skip - failed to authenticate with server ok 40 # skip - failed to authenticate with server ok 41 # skip - failed to authenticate with server ok 42 # skip - failed to authenticate with server ok 43 # skip - failed to authenticate with server ok 44 # skip - failed to authenticate with server ok 45 # skip - failed to authenticate with server ok 46 # skip - failed to authenticate with server ok 47 # skip - failed to authenticate with server ok 48 # skip - failed to authenticate with server ok 49 # skip - failed to authenticate with server ok 50 # skip - failed to authenticate with server ok 51 # skip - failed to authenticate with server ok 52 # skip - failed to authenticate with server ok 53 # skip - failed to authenticate with server ok 54 # skip - failed to authenticate with server ok 55 # skip - failed to authenticate with server ok 56 # skip - failed to authenticate with server ok 57 # skip - failed to authenticate with server ok 58 # skip - failed to authenticate with server ok 59 # skip - failed to authenticate with server ok 60 # skip - failed to authenticate with server ok 61 # skip - failed to authenticate with server ok 62 # skip - failed to authenticate with server ok 63 # skip - failed to authenticate with server ok 64 # skip - failed to authenticate with server # Looks like you planned 73 tests but ran 64. # Looks like you failed 1 test of 64 run.
Subject: pass.t.txt
ok 26 - not authenticated yet Using the key 'password' to refer to a passphrase is deprecated. Use 'passphrase ' instead at t/Net-SSH2.t line 109. ok 27 - authenticated via: publickey ok 28 - authenticated successfully ok 29 - new channel isa Net::SSH2::Channel ok 30 - set blocking ok 31 - not at EOF ok 32 - normal extended data handling ok 33 - merge extended data ok 34 - empty setenv ok 35 - set environment variables ok 36 - verify session ok 37 - set disconnect callback ok 38 - SFTP session isa Net::SSH2::SFTP ok 39 - verify session ok 40 - create directory net_ssh2_6868 ok 41 - stat directory ok 42 - type is directory ok 43 - directory name matches ok 44 - put t/Net-SSH2.t to remote ok 45 - get net_ssh2_6868/Net-SSH2.t from remote ok 46 - files match ok 47 - unlink non-existant file fails ok 48 - got LIBSSH2_FX_NO_SUCH_FILE error ok 49 - rename net_ssh2_6868/Net-SSH2.t -> net_ssh2_6868/Net-SSH2.t.renamed ok 50 - stat net_ssh2_6868/Net-SSH2.t.renamed ok 51 - stat filename matches ok 52 - stat filesize matches ok 53 - opened file isa Net::SSH2::File ok 54 - compare stat and fstat ok 55 - compare fstat % and %$ ok 56 - opened directory isa Net::SSH2::Dir ok 57 - found net_ssh2_6868/Net-SSH2.t.renamed ok 58 - opened file isa Net::SSH2::File ok 59 - read '\# THIS LINE WILL BE READ BY A TEST BELOW' ok 60 - unlink net_ssh2_6868/Net-SSH2.t.renamed ok 61 - remove directory net_ssh2_6868 ok 62 - close SFTP session ok 63 - exec 'ls -d /' ok 64 - got poll response ok 65 - got input event ok 66 - got result '/' ok 67 - no more lines ok 68 # skip - public key infrastructure not present ok 69 # skip - public key infrastructure not present ok 70 # skip - public key infrastructure not present ok 71 # skip - public key infrastructure not present ok 72 - close channel ok 73 - sent disconnect message
Subject: Re: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me
Date: Mon, 28 Sep 2015 23:28:20 +1000
To: <bug-Net-SSH2@rt.cpan.org>
From: <sisyphus1@optusnet.com.au>
Show quoted text
-----Original Message----- From: Bugs in Net-SSH2 via RT Sent: Monday, September 28, 2015 11:18 PM To: sisyphus@cpan.org Subject: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me
> If I change the script (at about lines 109 & 110) to use rsa > authentication then the script passes test 27 and terminates as shown in > the attached pass.t.txt - and this matches the output that I got with > 0.53.
Ugh !! Delete "- and this matches the output that I got with 0.53". The 0.53 (and probably earlier) version of the script required the very same amendment. Cheers, Rob
Subject: Re: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me
Date: Tue, 29 Sep 2015 12:27:35 +1000
To: <bug-Net-SSH2@rt.cpan.org>
From: <sisyphus1@optusnet.com.au>
For a fix, perhaps replace the current: my $type = $ssh2->auth(username => $user, @auth, publickey => "$ENV{HOME}/.ssh/id_dsa.pub", privatekey => "$ENV{HOME}/.ssh/id_dsa", interact => 1 ); with something like: my $enc = -e "$ENV{HOME}/.ssh/id_rsa.pub" ? 'rsa' : 'dsa'; my $type = $ssh2->auth(username => $user, @auth, publickey => "$ENV{HOME}/.ssh/id_$enc.pub", privatekey => "$ENV{HOME}/.ssh/id_$enc", interact => 1 ); Of course that doesn't address the deprecation warning. For that, we replace "password" with "passphrase" at lines 104 (approx) and 241 (approx). Cheers, Rob
Subject: Re: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me
Date: Tue, 29 Sep 2015 12:35:53 +1000
To: <bug-Net-SSH2@rt.cpan.org>
From: <sisyphus1@optusnet.com.au>
Show quoted text
> For that, we replace "password" with "passphrase" at lines 104 (approx) > and 241 (approx).
s/241/273/ Sorry - I just can't get *anything* right first time these days. Cheers, Rob
Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me
Date: Fri, 9 Oct 2015 13:28:11 +0000 (UTC)
To: "bug-Net-SSH2@rt.cpan.org" <bug-Net-SSH2@rt.cpan.org>
From: Salvador Fandino <sfandino@yahoo.com>
Show quoted text
----- Original Message -----
> From: Sisyphus via RT <bug-Net-SSH2@rt.cpan.org> > To: > Cc: > Sent: Monday, September 28, 2015 3:18 PM > Subject: [rt.cpan.org #107382] [Win32] No dsa authorisation for me > > Mon Sep 28 09:18:13 2015: Request 107382 was acted upon. > Transaction: Ticket created by SISYPHUS > Queue: Net-SSH2 > Subject: [Win32] No dsa authorisation for me > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: sisyphus@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107382 > > > > As it stands, the t/Net-SSH2.t script that ships with 0.55 (and earlier) fails > test 27 and terminates as shown in the attached fail.t.txt. > If I change the script (at about lines 109 & 110) to use rsa authentication > then the script passes test 27 and terminates as shown in the attached > pass.t.txt - and this matches the output that I got with 0.53. > > NOTE: I edit t/Net-SSH2.t prior to building so that: > 1) "my ($host, $user, $pass)" is set appropriately (line 16); > 2) $ENV{HOME} is set to the location of my .ssh folder. > > $ENV{HOME} is unset on my Windows machine, and I think that's the usual > thing on that OS. Hence the need for step 2)
I am unable to reproduce this problem. Both dsa and rsa keys work for me. Could the keys by protected by a passphrase?
Subject: Re: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me
Date: Fri, 9 Oct 2015 13:58:07 +0000 (UTC)
To: "bug-Net-SSH2@rt.cpan.org" <bug-Net-SSH2@rt.cpan.org>
From: Salvador Fandino <sfandino@yahoo.com>
Show quoted text
----- Original Message -----
> From: "sisyphus1@optusnet.com.au via RT" <bug-Net-SSH2@rt.cpan.org> > To: > Cc: > Sent: Tuesday, September 29, 2015 4:28 AM > Subject: Re: [rt.cpan.org #107382] AutoReply: [Win32] No dsa authorisation for me > > Queue: Net-SSH2 > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=107382 > > > > For a fix, perhaps replace the current: > > my $type = $ssh2->auth(username => $user, @auth, > publickey => > "$ENV{HOME}/.ssh/id_dsa.pub", > privatekey => "$ENV{HOME}/.ssh/id_dsa", > interact => 1 ); > > with something like: > > my $enc = -e "$ENV{HOME}/.ssh/id_rsa.pub" ? 'rsa' : > 'dsa'; > my $type = $ssh2->auth(username => $user, @auth, > publickey => > "$ENV{HOME}/.ssh/id_$enc.pub", > privatekey => > "$ENV{HOME}/.ssh/id_$enc",
> interact => 1 );
I have implemented something similar in the development version.
> Of course that doesn't address the deprecation warning.
That has also been solved.
Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me
Date: Sat, 10 Oct 2015 01:16:41 +1100
To: <bug-Net-SSH2@rt.cpan.org>, <sisyphus@cpan.org>
From: <sisyphus1@optusnet.com.au>
Show quoted text
-----Original Message----- From: Salvador \"Fandiño\" via RT Sent: Saturday, October 10, 2015 12:28 AM To: sisyphus@cpan.org Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me
> I am unable to reproduce this problem. Both dsa and rsa keys work for me. > > Could the keys by protected by a passphrase?
Perhaps it's just that I provided a bad description of the problem ... or perhaps the problem is the result of a bad set up regarding my authentication procedure. (Or perhaps both.) The thing is that I've apparently set myself up for rsa authentication only. So, on my machine, $ENV{HOME}/.ssh/id_dsa.pub and $ENV{HOME}/.ssh/id_dsa do not exist - and the test script's attempt to authorise via dsa fails; subsequent tests are skipped. But, on my machine, $ENV{HOME}/.ssh/id_rsa.pub and $ENV{HOME}/.ssh/id_rsa both exist - so an attempt to authorise via rsa will succeed; subsequent tests are (successfully) run. FAIK it may be that I have no justification for complaining about this state of affairs - and if that's the case then please close this ticket without further ado. (It's no big deal for me if I have to s/id_dsa/id_rsa/g in t/Net-SSH2.t.) Cheers, Rob
Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me
Date: Fri, 9 Oct 2015 14:27:07 +0000 (UTC)
To: "bug-Net-SSH2@rt.cpan.org" <bug-Net-SSH2@rt.cpan.org>
From: Salvador Fandino <sfandino@yahoo.com>
Show quoted text
> Perhaps it's just that I provided a bad description of the problem ... or > perhaps the problem is the result of a bad set up regarding my > authentication procedure. (Or perhaps both.) > > The thing is that I've apparently set myself up for rsa authentication only. > So, on my machine, $ENV{HOME}/.ssh/id_dsa.pub and > $ENV{HOME}/.ssh/id_dsa do > not exist - and the test script's attempt to authorise via dsa fails; > subsequent tests are skipped. > But, on my machine, $ENV{HOME}/.ssh/id_rsa.pub and > $ENV{HOME}/.ssh/id_rsa > both exist - so an attempt to authorise via rsa will succeed; subsequent
Show quoted text
> tests are (successfully) run.
Ok. I understand the problem now.
Show quoted text
> FAIK it may be that I have no justification for complaining about this state > of affairs - and if that's the case then please close this ticket without > further ado. > (It's no big deal for me if I have to s/id_dsa/id_rsa/g in t/Net-SSH2.t.)
No, no, your complaints are sound! That should now be fixed on the 0.56 release I did some minutes ago. Could you check it? https://metacpan.org/release/SALVA/Net-SSH2-0.56
Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me
Date: Sat, 10 Oct 2015 11:55:15 +1100
To: <bug-Net-SSH2@rt.cpan.org>
From: <sisyphus1@optusnet.com.au>
Show quoted text
-----Original Message----- From: Salvador \"Fandiño\" via RT Sent: Saturday, October 10, 2015 1:27 AM To: sisyphus@cpan.org Subject: Re: [rt.cpan.org #107382] [Win32] No dsa authorisation for me <URL: https://rt.cpan.org/Ticket/Display.html?id=107382 >
> That should now be fixed on the 0.56 release I did some minutes ago. Could > you check it?
Builds and tests fine for me !! Thank you for that. Cheers, Rob


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.