Help for this page

Select Code to Download


  1. or download this
       &register_handler("STDERR", sub {
                      my($channel, $buffer) = @_;
                      print "** STDERR -- I received this: ", $buffer->byt
    +es;
                          });
    
  2. or download this
    # Create the ssh2 object
       my $ssh2 = Net::SSH2->new();
    ...
    # connect to remote server
       $ssh2->connect($server) or die "** Failed to connect via Net::SSH2:
    + $!\n";
          print "**  Connect to server $server successful\n\n";