KalTorak has asked for the wisdom of the Perl Monks concerning the following question:
The results: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";
I've redirected stdout in the command I'm sending, and I've left it non-redirected - no difference. I tried adding and removing the "\n" argument to the cmd() arg list - removing it drops the "client: channel 1: send eof" debug info, but that's all. I made sure to install only the W32Perl module, so it could manage its own dependencies - no difference. I know the command works - there's a ~/date file that's getting created on the server side... it's just that my client script hangs. Am I missing something? Is there any solution which does NOT involve installing the PPMs from a Soulcage repository that doesn't exist? Thanks!... client: Requesting service shell on channel 0. client: channel 1: new [client-session] client: Requesting channel_open for channel 1. client: Entering interactive session. client: Sending command: /usr/bin/date > ~/date client: Requesting service exec on channel 1. client: channel 1: send eof client: channel 1: open confirm rwindow 262143 rmax 16384 (and here we hang indefinitely)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH::W32Perl rev 0.05, cmd hangs. Does Net::SSH::W32Perl 0.06 exist?
by syphilis (Archbishop) on Jul 26, 2008 at 01:41 UTC | |
by Anonymous Monk on Jul 26, 2008 at 19:07 UTC |