varalaxmibbnl has asked for the wisdom of the Perl Monks concerning the following question:
hi monks when i run this script it gives error like (Can't locate Net/SSH/Perl.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at netssh.pl line 5. BEGIN failed--compilation aborted at netssh.pl line 5.) this.. please help me out to solve this problem...n i have installed Net ssh also ...thanks in advance..
#!/usr/bin/perl use strict; use warnings; use Net::SSH::Perl; my $host = 'localhost'; my $pass = 'yourpassword'; my $user = 'yourusername'; my $cmd = 'pwd'; my $ssh = Net::SSH::Perl->new($host, protocol => '1,2', debug => 1); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ssh with perl
by daxim (Curate) on Sep 17, 2013 at 14:00 UTC | |
by varalaxmibbnl (Acolyte) on Sep 17, 2013 at 14:07 UTC | |
by Corion (Patriarch) on Sep 17, 2013 at 14:10 UTC | |
by daxim (Curate) on Sep 17, 2013 at 15:48 UTC | |
by varalaxmibbnl (Acolyte) on Sep 18, 2013 at 13:32 UTC | |
by daxim (Curate) on Sep 18, 2013 at 15:25 UTC | |
| |
by varalaxmibbnl (Acolyte) on Sep 18, 2013 at 13:29 UTC |