#filename: ingest.pl # start of Net::OpenSSH use Net::OpenSSH; my $host = '************'; my $port = '22'; my $user = 'root'; my $pass = '***********'; my $ssh = Net::OpenSSH->new($host); $ssh->error and die "couldn't establish connection: " . $ssh->error; $ssh->system("ls") or die "remote command failed: " . $ssh->error; my @ls = $ssh->capture("ls"); $ssh->error and die "remote ls command failed: " . $ssh->error;