When I run this under Red-Hat Linux with Perl v 5.8.0, it runs as expected, returning the listing of the directory. However, under Windows (ActiveState Perl v5.8.8b817) an error is returned. The error is "The getwuid function is unimplemented at c:/Perl/site/lib/Net/SSH/Perl.pm line 110. Net::SSH::Perl was not in the default libraries, so I ran CPAN and installed it from there.
When this error arose, I removed the directories from the site/lib directory, and ran PPM (after installing the http://theoryx5.uwinnipeg.ca/ppms/ repository). I have the same error.
Has anyone else had problems using this module on Windows, and know what to do to fix it? I did a search using "Net::SSH::Perl Windows" and only saw a 'permission denied' entry.
Here is my example
use strict; use warnings; use Net::SSH::Perl; my $server = "mycomp.mywork.office"; my $ssh = Net::SSH::Perl->new($server, options => ["BatchMode yes"]) or die "Failed trying to create primary SSH connection\n"; $ssh->config->set('interactive', 1) unless defined $ssh->config->get('interactive'); $ssh->login("myname", "mypass") or die "Login failed (ssh)\n"; my $cmd = "ls -ltr"; my @response = $ssh->cmd("$cmd"); print "RESPONSE = @response\n"; output:: C:\perlfiles>perl sshtest.pl The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Per +l.pm line 110.
Thanks!
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |