Help for this page
$ssh->error and die "remote ls command failed: " . $ssh->error;
use Net::OpenSSH; use Net::OpenSSH::Constants qw(:error); ... print "OUT: $output\n"; print "ERR: $errput\n"; print "RC: $?\n";