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"}); #### perl -MNet::OpenSSH -e 'Net::OpenSSH->new(q(USER:PASSWD@HOST))->system({tty=>1})'