http://www.perlmonks.org?node_id=1177560

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

Hello Monks, i'm migrating from Mac to PC, and in doing so i tried to move over Net::SFTP::Foreign, but in doing so i got alot of flack over the IO:Pty install, so i tried Net::SFTP but i can't install Net::SSH::Perl even with trying to force install. is there a good SFTP module out there that sort of just works on PC that should look for? all i need to do is upload image files. thanks!

Replies are listed 'Best First'.
Re: simple SFTP on windows
by VinsWorldcom (Prior) on Dec 09, 2016 at 19:29 UTC

    Net::SSH2 - it has Net::SSH2::SFTP and it's bundled with the Strawberry Perl distribution - which I personally prefer over ActiveState (put's flame retardant hat on).

      Yes, Net::SSH2 is the way to go, imo.
      However, I recommend using it via Net::SFTP::Foreign::Backend::Net_SSH2 - which uses Net::SFTP::Foreign.
      I don't think these additional modules ship with Strawberry Perl, but installation of them is trivial:
      cpan -i Net::SFTP::Foreign::Backend::Net_SSH2
      I don't know why the OP would have had trouble installing Net::SFTP::Foreign - perhaps it was because of the absence of Net::SSH2.
      Certainly, IO::Pty (which is unusable on native Windows) is not needed.

      Cheers,
      Rob
Re: simple SFTP on windows
by FreeBeerReekingMonk (Deacon) on Dec 09, 2016 at 23:21 UTC
    If you are not a purist (everything has to be done from inside Perl), you could also download cURL.exe and execute the commands through your perl script (see UPLOADING and SFTP)