use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($remote_host, protocol=>2) or die("could not connect"); $ssh->login($username", $password"); my $tcmd = "ls -la"; print "about to issue tcmd: $tcmd"; my($tout, $terr, $texit) = $ssh->cmd($tcmd); # this is the line that dies print "OUT:$tout, ERR:$terr, EX:$texit\n"; #### $output = system("/export/home/test/public_html/devel/scp_file.pl $local_filename $remote_box $remote_base $remote_path $remote_file", $return_var);