Help for this page

Select Code to Download


  1. or download this
    C:\perl\test_snippets>perl net-ssh.pl
    denmark: Reading configuration data /.ssh/config
    ...
    denmark: Sending command: hostname
    denmark: Requesting service exec on channel 1.
    denmark: channel 1: open confirm rwindow 0 rmax 32768
    
  2. or download this
    use Net::SSH::W32Perl;
    
    ...
    
        ($out, $err, $exit) = $ssh->cmd("hostname");
        print "Out: $out$/Err: $err$/Exit: $exit$/";