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"});