Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: help with Net::SFTP

by kevind0718 (Scribe)
on Jan 15, 2008 at 18:49 UTC ( #662529=note: print w/ replies, xml ) Need Help??

in reply to Re: help with Net::SFTP
in thread help with Net::SFTP

I made the changes as you suggested, the new code follows:

use strict; use warnings; use Net::SFTP; my $SFTPSite = 'sftp.xxxxbroker' ; my $userid = 'fred'; my $pword = 'bedrock'; my $entry = undef; #** ** ** ** ** ** ** ** # Setup to do the SFTP my $sftp = Net::SFTP->new( $SFTPSite, $userid, $pword ) 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"; }

the following error message resulted from the above code.

C:\dev\FTPPerl>perl The getpwuid function is unimplemented at c:/progFiles/PERL/site/lib/Net/SSH/ line 110.

I belive that I an missing something to support Net::SFTP. Maybe I have an old version of Net:SSH But do not know how to figure that out.
As per the ActiveState Perl Package Manager I have the following SSH stuff installed:
Net-SSH 0.08
Net-SSH-Perl 1.30
Net-SSH-W32-Perl .05

thanks for your assistance.


Comment on Re^2: help with Net::SFTP
Download Code
Replies are listed 'Best First'.
Re^3: help with Net::SFTP
by andyford (Curate) on Jan 15, 2008 at 19:23 UTC

    Looks like a deficiency in the Net::SSH::Perl or Net::SSH::W32Perl modules rather than a missing module. getpwuid doesn't exist on Win32, but Net::SSH::Perl is trying to call it.

    I wonder if Net::SSH::W32Perl is supposed to be some kind of helper to get around that.

    Perhaps try the example in the Net::SSH::W32Perl to see if it works by itself?

    Or take the easy-ugly-fast way and use system to shell out to a command line sftp client.

      thanks for your reply.
      As I suspected, this is a configuration or compatibility issue.

      Do any of the other kind monks have any ideas?
      Has anybody gotten SFTP to work under wondows?

        I am working on windows xp machine. i want to install this package in my machine. please can u tell me how to install this package. i am using ppm install net::sftp but it is through error. please can u tell me what all we have to configure for this. shafi

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://662529]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2015-11-27 20:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls