eandalu has asked for the wisdom of the Perl Monks concerning the following question:
If I use this script:use strict; use warnings; use Net::SSH(); my $Host = "ip1.ip2.ip2.ip4"; my $Port = "1234"; my $passwd = "psw"; my $username = "user"; my $t = New Net::SSH(Timeout => 30); $t->open(Host => $Host,Port => $Port); $t->errmode("return"); $t->waitfor('/:/'); $t->print($username); $t->waitfor('/:/'); $t->print($passwd);
I receive the following error:use strict; use warnings; use Net::SSH::Perl(); my $Host = "ip1.ip2.ip2.ip4"; my $Port = "1234"; my $passwd = "psw"; my $username = "user"; my $t = New Net::SSH::Perl(Timeout => 30); $t->open(Host => $Host,Port => $Port); $t->errmode("return"); $t->waitfor('/:/'); $t->print($username); $t->waitfor('/:/'); $t->print($passwd);
Any suggestion? Many thanks in advance... AndreaC:\>perl SSH3.pl Can't locate Net/SSH/Perl.pm in @INC (@INC contains: C:/Perl64/site/li +b C:/Perl64/lib .) at SSH3.pl line 4. BEGIN failed--compilation aborted at SSH3.pl line 4.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't locate object method "New" via package "Net::SSH" at
by hdb (Monsignor) on Apr 25, 2013 at 09:56 UTC | |
by DrHyde (Prior) on Apr 25, 2013 at 10:17 UTC | |
by choroba (Cardinal) on Apr 25, 2013 at 10:22 UTC | |
|
Re: Can't locate object method "New" via package "Net::SSH" at
by 2teez (Vicar) on Apr 25, 2013 at 10:41 UTC | |
|
Re: Can't locate object method "New" via package "Net::SSH" at
by hdb (Monsignor) on Apr 25, 2013 at 10:22 UTC |