Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

How get SFTP for Windows 64 bit architecture and ActivePerl 5.12

by ozguy (Novice)
on Jul 05, 2011 at 23:11 UTC ( [id://912892]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I've googling for quite a while now to try to find an effective solution to how to pull files from external SFTP servers on a Windows Server 2008 R2 64 bit server. We are Using ActivePerl 5.12 64 bit. I've investigated NET::SFTP, but it's not available for Windows 64 bit architecture. Same for NET:SSH2. I've just tried NET::SFTP::Foreign, and failed as the module needs IO:PTY and Expect modules (and lord knows what else), which I cannot find for Windows, let alone Windows 64 bit. This would be a piece of Pie on Linux, however Windows Server 2008 R2 64 bit and ActivePerl 64 bit 5.12, is what we have to use. Any idea's guru's? Thanks in advance.
  • Comment on How get SFTP for Windows 64 bit architecture and ActivePerl 5.12

Replies are listed 'Best First'.
Re: How get SFTP for Windows 64 bit architecture and ActivePerl 5.12
by syphilis (Archbishop) on Jul 06, 2011 at 00:37 UTC
    Simply add the 'sisyphusion' repo to your ppm repositories. (The actual repo is at www.sisyphusion.tk/ppm though if you have a sufficiently recent version of 5.12, it should just be a matter of running ppm repo add sisyphusion )

    Then run:
    ppm install Net-SFTP-Foreign-Backend-Net_SSH2
    and that should install that module, along with its dependencies (Net::SFTP::Foreign and Net::SSH2). Then it's just a matter of:
    use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign-> new(host => $server, backend => 'Net_SSH2', user => $user, password => $pass);
    (See the Net::SFTP::Foreign docs for further details.)

    You can, if you prefer, just ppm install Net-SSH2, but the task of coding is much simplified if you use the Net-SSH2 backend with Net-SFTP-Foreign. (That's what I've been using, and I've found it to be excellent.)

    Please let me (or the repo owner) know if there's any problems with any of that.

    Cheers,
    Rob

      This sounds like the solution I need, so using ActivePerl 5.14 PPM I added repo for sisyphusion, and now get file conflict error c:/perl64/site/bin/libgcc_sis__470.dll when installing. The backend-net-SSH2 already installed the file that Net-SSH2 wants to install. How can I resolve the conflict? Also odd seeing 2 Net-SFTP-Foreign clients 1.73 showing above Net-SFTP-Foreign-Backend-Net_SSH2 in the package name window.

        In PPM GUI manually install the dependencies: Net-Foreign Net-SSH2 then at a cmd prompt type: ppm-shell and enter: ppm> install Net-SFTP-Foreign-Backend-Net_SSH2 --force --nodeps

Re: How get SFTP for Windows 64 bit architecture and ActivePerl 5.12
by salva (Canon) on Jul 06, 2011 at 06:54 UTC
    Net::SFTP::Foreign can also use plink (distributed with PuTTY) as the SSH client in order to support password authentication and without requiring Expect, though that alternative is not completely secure (the password is passed to plink on the command line and could be seen by other users logged on the local machine).

    The Net::SSH2 backend as described by syphilis is usually the best option.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found