Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use Net::SSH::Perl;
- my $host = "perlhowto.com";
- my $user = "user";
- my $password = "password";
- #-- set up a new connection
- my $ssh = Net::SSH::Perl->new($host);
- #-- authenticate
- $ssh->login($user, $pass);
- #-- execute the command
- my($stdout, $stderr, $exit) = $ssh->cmd("ls -l /home/$user");
- Can't locate loadable object for module Math::Pari in @INC (@INC contains: /usr/local/lib/perl5/5.10.1/i686-linux /usr/local/lib/perl5/5.10.1 /usr/local/lib/perl5/site_perl/5.10.1/i686-linux /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/vendor_perl/5.10.1/i686-linux /usr/local/lib/perl5/vendor_perl/5.10.1 /usr/local/lib/perl5/vendor_perl .) at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util/SSH2MP.pm line 6
- Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
- BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
- Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
- BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> line 1.
- Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
- BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
- Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
- BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
- Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl.pm line 52, <GEN0> line 1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement