use Net::OpenSSH; use warnings; my $path = "/export/home/tenfold2/.ssh/"; $Net::OpenSSH::debug |= 16; my $t = Net::OpenSSH->new('ildep@sxm0019', master_opts => [-o => "UserKnownHostsFile=/dev/null", -o => "StrictHostKeyChecking=no"], timeout => 10, ctl_dir => $path); $t->error and SendMail "unable to connect to remote host: ". $t->error; my $cmd = "ls -l";