May 22, 2011, 12:30 AM
Post #1 of 2
Help required for SFTP code in Perl..urgent !!!
I am supposed to write a perl code that uses SFTP to transfer one file from my server to another server.
The arguments are supposed to be read from a separate configuration file.
The name of the config file is interface.cfg, and the name of the main perl file is interface.pl
Configuration file format:
# Ftp to machine - interface
hash_ref_Ftp_address= <server address>
(Currently I am using FTP...)
Now I want to make this into an SFTP with RSA key(s) included. How should I add the argument?
Perl file format:
I am currently taking parameters like these-
Similarly I need to take keys as parameters from the configuration file.
How would I create an SFTP connection and how would I log in? and How would I take keys as arguments?
This are the commands I need to execute:
my $sftp = Net::SFTP->new($v_sftp_address, Debug => 1,..)
Do I only need to install Net::SFTP module for all this?
I am a complete newbie so please help urgently !!!