sankarg has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, New Year wishes.
I need to download files to one location and upload files from another location to a specified path in SFTP. I am using windows OS and i tried with Perl module Net::SFTP but it doesn't works for me. I used the below code to connect the SFTP server but i failed with this. Kindly help me to connect the SFTP server.
use strict; use Net::SFTP; my $host = "xxx.xxx.xxx.xxx"; my %args = ( user => 'username', password => 'password', debug => 'false' ); my $sftp = Net::SFTP->new($host, %args); print "connected!";
This is the error i got from the script. "Can't map service name 'ssh' to port number at C:/Perl/site/lib/Net/SFTP.pm line 61"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Downloading files from SFTP in windows
by tobyink (Canon) on Jan 02, 2013 at 10:56 UTC | |
Re: Downloading files from SFTP in windows
by saberworks (Curate) on Jan 02, 2013 at 16:17 UTC | |
Re: Downloading files from SFTP in windows
by syphilis (Archbishop) on Jan 02, 2013 at 17:48 UTC |
Back to
Seekers of Perl Wisdom