Monday, March 2, 2009

Quick Tip - Using SFTP in Perl

I tried using the SFTP perl module, but was too much worth the effort. Then I stumbled upon something called PSFTP. This can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
This is a cool program that lets you call itself from within a perl script so that you don't have to bother about the internals of creating a connection, executing a command etc.
For calling it from within your perl script you would need to use the batchmode with noagent option for the command.

The only drawback that I see as of now is that you cannot maintain sessions and do multiple commands in a single shot.

Happy Perling!


Make Custom Gifts at CafePress

No comments:

Post a Comment