Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: help with Net::SFTP

by kevind0718 (Scribe)
on Jan 15, 2008 at 18:49 UTC ( [id://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 testSFTP.pl The getpwuid function is unimplemented at c:/progFiles/PERL/site/lib/Net/SSH/Perl.pm 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.

kd

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?

      kd
        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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found