Loading ...
Sorry, an error occurred while loading the content.

26581Re: [PBML] How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

Expand Messages
  • leebinkley
    Apr 12 12:45 PM
    • 0 Attachment
      #!/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");

      =====================
      Posted through Grouply, the better way
      to access your Yahoo Groups like this one.
      http://www.grouply.com/?code=post


      [Non-text portions of this message have been removed]
    • Show all 3 messages in this topic