NeerajPandey has asked for the wisdom of the Perl Monks concerning the following question:
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl5/Net/SSH/Perl/Key.pm line 13, <$fh> line 7.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl5/Net/SSH/Perl/Key.pm line 13, <$fh> line 8.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl5/Net/SSH/Perl/Key.pm line 13, <$fh> line 9.
Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl5/Net/SSH/Perl/Key.pm line 13, <$fh> line 10
here is my code:use Net::SSH::Perl; $username="root"; $passwd="password"; @server = ("10.14.34.80"); my %SSH_Prm = ( "protocol" => '2', "options" => ["stricthostkeychecking no"], ); foreach $a(@server) { $ssh = Net::SSH::Perl->new($a,%SSH_Prm); $ssh->login($username, $passwd); $cmd="hostname"; my($stdout, $stderr,$exit) = $ssh->cmd("$cmd"); print "$stdout"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net SSH Perl warning.
by GotToBTru (Prior) on Jun 02, 2016 at 14:52 UTC |