Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use Net::SSH::Perl; use strict(); my $host = ""; my $user = ""; my $password = ""; #-- set up a new connection my $ssh = Net::SSH::Perl->new($host,debug=>1,use_pty=>1); #-- authenticate $ssh->login($user, $pass); #-- execute the command my($stdout, $stderr, $exit) = $ssh->cmd("ls -l /home/$user");
How to solve this errorError ----- Name "main::pass" used only once: possible typo at Untitled2 line 17. Can't locate object method "new" via package "Net::SSH::Perl" (perhaps + you forgot to load "Net::SSH::Perl"?) at Untitled2 line 15.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl ssh error
by armstd (Friar) on Oct 10, 2011 at 04:36 UTC | |
Re: Perl ssh error
by salva (Canon) on Oct 10, 2011 at 08:08 UTC | |
Re: Perl ssh error
by keszler (Priest) on Oct 10, 2011 at 05:21 UTC |