P is for Practical | |
PerlMonks |
Re: SFTP on Windowsby syphilis (Archbishop) |
on Nov 01, 2010 at 01:21 UTC ( [id://868666]=note: print w/replies, xml ) | Need Help?? |
I use Net::SSH2 to handle both sftp and scp. As regards coding, it's much simpler to do the transfer via scp: In order to sftp, one first has to write the code that's going to open the file on the remote server, read the local file into a buffer, then transmit the local file (one buffer at a time) to the remote server. I would expect that if the server you're connecting to can handle sftp, then it can also handle scp - and I therefore recommend using scp. However, if you've already written the sub that handles the sftp, then there's no reason to not keep using it. I've found it necessary (over slow connections) to patch SSH2.pm as follows, in order for scp to work correctly. (This patch is already included in the ppm packages from the uwinnipeg repo.): See the discussion about that bug for further details. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|