[Ssh-sftp-perl-users] File is not readable
Brought to you by:
dbrobins
From: Min L. <ml...@ff...> - 2010-05-27 21:37:23
|
I was able to use Net::SFTP to connect to a server and also print the files in the directory. However, I have problem downloading the file using 'get'. I specified the local file name but it was not created by running the script. Instead, a file with the same name as the remote file (my $file = 'remote_file_name.txt') was created but it is not readable. use Net::SFTP; my %args = ( user => $user, password => $passw, debug=>1); my $sftp = Net::SFTP->new($host, %args); my $file = 'remote_file_name.txt'; my $string = $sftp->get("./$file", 'local_file_name.txt');# or die "unable to download file\n"; Debugging message from the module doesn't help too much: sftp: Sent message T:17 I:0 sftp: Received stat reply T:105 I:0 sftp: Sent SSH2_FXP_OPEN I:1 P:./ remote_file_name.txt sftp: Sent message SSH2_FXP_READ I:2 O:0 sftp: Received reply T:101 I:2 sftp: Sent message T:4 I:3 Thanks in advance for help. ________________________________ This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you are notified that reviewing, disseminating, disclosing, copying or distributing this e-mail is strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any loss or damage caused by viruses or errors or omissions in the contents of this message, which arise as a result of e-mail transmission. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA, FriendFinder.com |