in reply to SFTP on Windows

You can also run Net::SFTP::Foreign on top of Net::SSH2 using Net::SFTP::Foreign::Backend::Net_SSH2.

Replies are listed 'Best First'.
Re^2: SFTP on Windows
by syphilis (Archbishop) on Nov 01, 2010 at 10:58 UTC
    You can also run Net::SFTP::Foreign on top of Net::SSH2 using Net::SFTP::Foreign::Backend::Net_SSH2.

    salva, what are the advantages of doing that - as opposed to simply using Net::SSH2 ?

    I'm thinking that if it's using Net::SSH2 then Net::SFTP::Foreign::Backend::Net_SSH2 is not going to provide any performance boost ... therefore, maybe it provides some advantages when it comes to writing the code ?
    Does it, for example, simplify the coding of an sftp_put() ?

    Cheers,
    Rob
      I'm thinking that if it's using Net::SSH2 then Net::SFTP::Foreign::Backend::Net_SSH2 is not going to provide any performance boost
      Actually it is!

      Net::SSH2 support for SFTP (Net::SSH2::SFTP) is very basic and implementing efficient file transfer operations on top of it is far from trivial.

      Besides that, Net::SFTP::Foreign provides a bunch of high level methods such as find, glob, mput, rput, etc.

        Just installed Net::SFTP::Foreign::Backend::Net_SSH2 and gave it a try. Couldn't detect any improved performance for a "put" of an 8Mb file over a local connection - but the coding is so much simpler (no need to come up with my own "put" subroutine), and it's far more flexible than Net::SSH2.

        Nice work, salva. I'll certainly be making good use of this module from now on.

        Cheers,
        Rob

        Update: The sftp transfer of that file takes about 30 seconds. I've just checked the time it takes to scp_put() the same file and it's only about 4 seconds !!
        Is that time disparity to be expected ?
Re^2: SFTP on Windows
by Limbic~Region (Chancellor) on Nov 15, 2010 at 17:45 UTC
    salva,
    The client I had kludged a working solution for asked for yet another feature. Instead of shoehorning it in, I tried your suggestion of Net::SFTP::Foreign::Backend::Net_SSH2. I will now be using this as my SFTP solution for Windows boxes in the future - thank you!

    Cheers - L~R