#!/usr/bin/perl use strict; use warnings; use Net::OpenSSH; my $host = "10.92.xx.x"; my $user = "data"; my $key_path = 'C:\Scripts\dataops.pem'; my $port = "22"; $Net::OpenSSH::debug |= 16; my $ssh = Net::OpenSSH->new(host=>$host, user=>$user, port=>$port, #password=>$password, key_path => $key_path); $ssh->error and die "SSH connection failed: " . $ssh->error; $ssh->system("ls /usr/home/dataops") or die "remote command failed: " . $ssh->error; #### # open_ex: ['ssh','-V'] # killing SSH slave, pid: -18436 # waiting for slave, timeout: 0, remaining: 0, sleep: 0.1