in reply to CPAN Net::SSH::W32Perl Problem

Net::SSH::W32Perl is a bit sketchy. Personally I would just use PuTTY to create a public key to put on your server and wrap plink (command line utility in the PuTTY family) to send commands to it over via SSH.

Using ActivePerl 5.8 I was able to install Net::SSH::Perl and Net::SSH::W32Perl, provided I did not run nmake test during the installation process. Not recommended practice but I could never get it to pass.

Then I had to remove/modify references to the getpwuid function in the C:\Perl\site\lib\Net\SSH\Perl.pm module, as there is no getpwuid on Windows platforms.

Using it is also a bit of a trick. Do not expect any command output to return to the client (you) and your script will hang if your command does produce output. Since all you are doing is touching a file, you should be OK.

my ($out, $err, $exit) = $ssh->cmd('touch /usr/local/create.txt', "\n");

The "\n" is important. If you are going to run a command that will produce output, pipe it to a file:

my ($out, $err, $exit) = $ssh->cmd('ls -al > ls_out', "\n");