Reputation: 930
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 = "termide";
my $ssh = Net::SSH::Perl->new($ip, use_pty => 1);
$ssh->login($user, $pass);
Upvotes: 1
Views: 3178
Reputation: 10242
Net::SSH2 is another SSH client that works on Windows and far easier to install. A PPM is available from here.
Upvotes: 0
Reputation: 944175
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.
Upvotes: 7
Reputation: 3508
You should install Net::SSH::Perl
, not Net::SSH
. The error message is clean about that :)
Upvotes: 3