Think about Loose Coupling | |
PerlMonks |
Re: Net::SFTP messby Aighearach (Initiate) |
on Nov 09, 2004 at 02:07 UTC ( [id://406266]=note: print w/replies, xml ) | Need Help?? |
You could just use scp. scp is way better than sftp for scripting, IMO. And also, for sysadmin type tasks, I would rather use Perl as glue, than try to reinvent tools with it just to do it in Pure Perl. Just too... religious, for me.
I use public/private keys for authentication in this case, because not only is it (only slighter) safer than putting the password in the script, but it removes the need to interact with scp in order to transfer files. Here is another version using ssh and rsync, so as to only send the parts that changed, and ignores .CVS files: Of course, if the usernames on the aren't the same, you have to add that also. -- Snazzy tagline here
In Section
Seekers of Perl Wisdom
|
|