Does the reputed Net::SSH::W32Perl rev 0.06 actually exist?
People claim they have it, but soulcage.net is gone, and installing PPMs directly from there seemed to be involved...
I've got ActiveState perl 5.8.8 build 822 installed.
I got Net::SSH::W32Perl (rev 0.05) installed from the UWinnipeg PPM repository, and I'm trying to do a simple "Run a command on a Unix box" script. Most(?) importantly, I uninstalled Net::SFTP, Net::SSH::Perl, and Net::SSH::W32Perl, and installed only Net::SSH::W32Perl (and let it take care of its own dependencies) - that seems to have been some people's answer.
I hit the getpwuid problem, I set HOME=something, and got around it.
I couldn't authenticate against the ssh daemon on the other end, I got a public/private key pair set up and working - I can login.
But as soon as I try a cmd(), I hang. Lots of people seem to have a similar issue, and I can't seem to find a fix.
My script (with a couple things anonymized):
$host = "myserver";
$user = "myuserid";
my $ssh = Net::SSH::W32Perl->new($host,
debug => 1,
interactive => 0,
use_pty => 0,
identity_files => ["id_rsa"]);
$cmd = '/usr/bin/date > ~/date';
#my($out, $err, $exit) = $ssh->cmd($cmd);
print "STDOUT: $out";
print "STDERR: $err";
print "ExitCode: $exit";
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)
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?