Perl script cant find Net/SSH/Perl.pm
Im trying to run a perl script which involves ssh to a remote server and while executing this code, it throws an error like
Can't locate Net/SSH/Perl.pm in INC <@INC contains:C:/Perl/site/lib c:\perl\lib at line5.
I open ppm graphical UI and installed NET-SSH, area= site but still not able to execute this script Here is the script
use strict;
use warnings;
use Net::SSH::Perl;
my $ip=12.14.142.22;
my $user = "qwerty";
my $pass = "ter开发者_如何学Pythonmide";
my $ssh = Net::SSH::Perl->new($ip, use_pty => 1);
$ssh->login($user, $pass);
While Foo::Bar often includes a Foo::Bar::Baz module, that isn't the case here.
Net::SSH and Net::SSH::Perl are different distributions. You need to install Net::SSH::Perl.
You should install Net::SSH::Perl
, not Net::SSH
. The error message is clean about that :)
Net::SSH2 is another SSH client that works on Windows and far easier to install. A PPM is available from here.
精彩评论