[Ssh-sftp-perl-users] SFTP->get function failing
Brought to you by:
dbrobins
From: <raj...@pe...> - 2008-05-26 07:30:33
|
Hello everyone, I'm studying SFTP. I have sample program to transfer files across two machines written in Perl. Some how my SFTP->get function is failing, but the file I'm trying to get from server is getting copied on client. Following is the code snipet: #!/usr/bin/perl use Net::SFTP; my $host = 'xx.yy.zz.aa'; # User name and password my %args = ( "user", 'user1', "password", 'password1' ); my $localFilename = 'local.txt'; my $remoteFilename = 'remote.txt'; # Creating the SFTP connection my $sftp = Net::SFTP->new($host,%args); # sftp object and connection get created successfully # Downloading file now if(!$sftp->get($remoteFilename,$localFilename)) { my $err = $sftp->status(); # $err gets 0 value print (" Get failed"); } Do anyone have any clue why my get function is failing? I'm using perl 5.8.6 on Fedora core 4. Thanks in advance. ~ Regards, Rajnikant Jachak DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |