Hello everyone,
I am new to coding in Net::OpenSSH. When running the code below, I received the following message after the output was displayed. "Killed by signal 1" Does anyone know what could be causing this message and how to correct it?
Thanks
My Code:
use Net::OpenSSH;
my $host ='host';
my $user = 'user';
my $password = 'passwd';
my $ssh = Net::OpenSSH->new(host => $host, user => $user, password =>
+$password, ssh_cmd => '/usr/bin/ssh');
$ssh->error and die "SSH connection failed: " . $ssh->error;
my $rv = $ssh->system("ls -l");
print "$rv\n";