use Net::SSH::W32Perl; $host = "myserver"; $user = "myuserid"; my $ssh = Net::SSH::W32Perl->new($host, debug => 1, interactive => 0, use_pty => 0, identity_files => ["id_rsa"]); $ssh->login($user); $cmd = '/usr/bin/date > ~/date'; #my($out, $err, $exit) = $ssh->cmd($cmd); $ssh->cmd($cmd, "\n"); print "STDOUT: $out"; print "\n\n"; print "STDERR: $err"; print "\n\n"; print "ExitCode: $exit"; print "\n\n";