Help for this page

Select Code to Download


  1. or download this
    my $ssh = Net::OpenSSH->new("$username:$password\@$ip", timeout => 30)
    +;
    $ssh->error and die "unable to connect to remote host: ". $ssh->error;
    
    my $out = $ssh->capture({stdin_data => "show ip arp\n"});
    
  2. or download this
    perl -MNet::OpenSSH -e 'Net::OpenSSH->new(q(USER:PASSWD@HOST))->system
    +({tty=>1})'