briandfoy / net-ssh-perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
4 stars 1 forks source link

login issues uninitialized value warnings #50

Open briandfoy opened 1 year ago

briandfoy commented 1 year ago

This ticket was imported from rt.cpan.org 112085

Hi Steffen!

When running Net-SSH-Perl-1.42 http://search.cpan.org/~schwigon/Net-SSH-Perl-1.42/

I get the following warnings (appears to be at $ssh->login( $user, $pass ); line)

Use of uninitialized value $blob in split at
/Library/Perl/5.10.0/Net/SSH/Perl/Key.pm line 41, <$fh> line 4.
Use of uninitialized value $ssh_name in hash element at
/Library/Perl/5.10.0/Net/SSH/Perl/Key.pm line 42, <$fh> line 4.
Use of uninitialized value in subroutine entry at
/Library/Perl/5.10.0/Net/SSH/Perl/Key.pm line 45, <$fh> line 4.
Use of uninitialized value within @_ in concatenation (.) or string at
/Library/Perl/5.10.0/Net/SSH/Perl/Key.pm line 13, <$fh> line 4.

All else appears to work fine, just thought you might like to know. Please let me know if I can provide additional info.

Thanks! Kevin

uname -a
Darwin xxx.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41
PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
perl -v

This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

code

#!/usr/bin/perl
use strict;
use warnings;
use Net::SSH::Perl;
use Data::Dumper;
my $host = 'xxxxx';
my $user       = 'xx';
my $pass       = 'xx';
my $cmd = 'dir ';

my $ssh = Net::SSH::Perl->new($host);
$ssh->login( $user, $pass );
my ( $stdout, $stderr, $exit ) = $ssh->cmd($cmd);
print Dumper($stdout, $stderr, $exit);
briandfoy commented 1 year ago

from schwigon@cpan.org


On Tue Feb 16 14:11:19 2016, kevin.burdish@nytimes.com wrote:

Hi Steffen!

When running Net-SSH-Perl-1.42 http://search.cpan.org/~schwigon/Net-SSH-Perl-1.42/

I get the following warnings (appears to be at $ssh->login( $user, $pass );

I had a similar report from someone else but don't see this in my environment. Can you please try out if that still fails with v2.01? Thank you very much.

Kind regards, Steffen

briandfoy commented 1 year ago

from kevin.burdish@nytimes.com


Steffan:

These are the errors I'm getting after install of 2.01

Use of uninitialized value $blob in split at /Library/Perl/5.10.0/darwin-thread-multi-2level/Net/SSH/Perl/Key.pm line 42, <$fh> line 4.
Use of uninitialized value $ssh_name in hash element at /Library/Perl/5.10.0/darwin-thread-multi-2level/Net/SSH/Perl/Key.pm line 43, <$fh> line 4.
Use of uninitialized value in subroutine entry at /Library/Perl/5.10.0/darwin-thread-multi-2level/Net/SSH/Perl/Key.pm line 46, <$fh> line 4.
Use of uninitialized value within @_ in concatenation (.) or string at /Library/Perl/5.10.0/darwin-thread-multi-2level/Net/SSH/Perl/Key.pm line 13, <$fh> line 4.
Received disconnect message: Too many attempts.
 at /Library/Perl/5.10.0/darwin-thread-multi-2level/Net/SSH/Perl/AuthMgr.pm line 157.

Thanks! Kevin

Below are the results of the install

sh-3.2# cpanm  Net::SSH::Perl
--> Working on Net::SSH::Perl
Fetching http://www.cpan.org/authors/id/S/SC/SCHWIGON/Net-SSH-Perl-2.01.tar.gz ... OK
Configuring Net-SSH-Perl-2.01 ... OK
==> Found dependencies: Crypt::Curve25519, CryptX
--> Working on Crypt::Curve25519
Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.05.tar.gz ... OK
Configuring Crypt-Curve25519-0.05 ... OK
Building and testing Crypt-Curve25519-0.05 ... FAIL
! Installing Crypt::Curve25519 failed. See /Users/videoscript/.cpanm/build.log for details.
--> Working on CryptX
Fetching http://www.cpan.org/authors/id/M/MI/MIK/CryptX-0.030.tar.gz ... OK
Configuring CryptX-0.030 ... OK
Building and testing CryptX-0.030 ... OK
Successfully installed CryptX-0.030
! Bailing out the installation for Net-SSH-Perl-2.01. Retry with --prompt or --force.
1 distribution installed

and the --force

sh-3.2# cpanm  --force Net::SSH::Perl
--> Working on Net::SSH::Perl
Fetching http://www.cpan.org/authors/id/S/SC/SCHWIGON/Net-SSH-Perl-2.01.tar.gz ... OK
Configuring Net-SSH-Perl-2.01 ... OK
==> Found dependencies: Crypt::Curve25519
--> Working on Crypt::Curve25519
Fetching http://www.cpan.org/authors/id/A/AJ/AJGB/Crypt-Curve25519-0.05.tar.gz ... OK
Configuring Crypt-Curve25519-0.05 ... OK
Building and testing Crypt-Curve25519-0.05 ... FAIL
! Testing Crypt-Curve25519-0.05 failed but installing it anyway.
Successfully installed Crypt-Curve25519-0.05
Building and testing Net-SSH-Perl-2.01 ... OK
Successfully installed Net-SSH-Perl-2.01 (upgraded from 1.42)
2 distributions installed
briandfoy commented 1 year ago

from schwigon@cpan.org


Ok, thank you very much for testing.

Just for the records so I remember later: I tried to reproduce, played around with known_hosts (hashed and non-hashed), deinstalled Crypt::Curve25519 to emulate your dependency failure, used Perl 5.10 (though 5.10.1), but still can't reproduce.

I try again later to read the code further where that missing value comes from, need to get some sleep now. :-)

Kind regards, Steffen