Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use Net::SSH::Perl;
  4.  
  5. my $host = "perlhowto.com";
  6. my $user = "user";
  7. my $password = "password";
  8.  
  9. #-- set up a new connection
  10. my $ssh = Net::SSH::Perl->new($host);
  11. #-- authenticate
  12. $ssh->login($user, $pass);
  13. #-- execute the command
  14. my($stdout, $stderr, $exit) = $ssh->cmd("ls -l /home/$user");
  15.  
  16.  
  17. 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
  18. Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
  19. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util/SSH2MP.pm line 6, <GEN0> line 1.
  20. Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Util.pm line 56, <GEN0> line 1.
  21. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex/DH1.pm line 10, <GEN0> line 1.
  22. Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
  23. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/Kex.pm line 6, <GEN0> line 1.
  24. Compilation failed in require at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
  25. BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.10.1/Net/SSH/Perl/SSH2.pm line 6, <GEN0> line 1.
  26. 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