Help for this page

Select Code to Download


  1. or download this
      my $ssh = Net::SSH::Perl->new($host,protocol=>2, interactive=>1);
      $ssh->login($user, $pass, 1);
      my $cmd = 'some_command ' . $cmd_opt;
      my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
      print "OUT:$stdout\n ERR:$stderr\n EXIT:$exit\n";
    
  2. or download this
    OUT:  First Line
    
    ERR:
    EXIT:0
    
  3. or download this
    bash$ cmd opt
      First Line
      Second Line
    bash$