kevind0718 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Wise Monks: I come before you with a humble request

I am trying to get Net::SFTP to work under Windows XP.

This is my code:
use strict; use warnings; use Net::SFTP; my $SFTPSite = 'sftp.primebroker.com' ; my $userid = 'fred'; my $pword = 'bedrock'; my $entry = undef; #** ** ** ** ** ** ** ** # Setup to do the SFTP my $sftp = Net::SFTP->new( $SFTPSite, user=>'fred', password=>'barney' +, debug=>1) or die "Could NOT create SFTP " ; #Net::SFTP const +ructor my @entries = $sftp->ls('/'); # slurp all entries into an array foreach $entry (@entries) { print "$entry \n"; chomp $entry; my @fields = split /\s+/, $entry; print "the file name: " . $fields[-1] . "\n"; }
When I run this code I get:
The getpwuid function is unimplemented at c:/progFiles/PERL/site/lib/Net/SSH/Perl.pm line 110.
And the program dies.

I have downloaded Putty and have no problem using Putty to logon to the site and download files. Just can not get SFTP to work within Perl.

Could a wise monk, with more experience than myself, please provide some guidenance.

Best Regards

KD

Replies are listed 'Best First'.
Re: Net::SFTP under Windows
by Anonymous Monk on Aug 27, 2008 at 14:56 UTC