[Ssh-sftp-perl-users] SFTP->new taking more time
Brought to you by:
dbrobins
From: Rajnikant <raj...@pe...> - 2008-05-26 15:31:03
|
Hello everyone, I'm using SFTP to transfer file across two machines. The SFTP object creation and connection establishement is taking more time. Following is the code snipet in Perl that I'm using: #!/usr/bin/perl use Net::SFTP; my $host = 'xx.yy.zz.aa'; my %args = ( "user", 'root', "password", 'pass123' ); my $remoteFilename = '/var/opt/mydata/remote.txt'; my $localFilename = '/root/Test/local.txt'; my $sftp = Net::SFTP->new($host,%args); print (" Got connected to host"); if(!($sftp->get($remoteFilename,$localFilename)) ) { my $err = $sftp->status(); print (" Get failed "); } The SFTP object creation takes around 15-25 seconds to get connected to server. Is it observed behaviour or is there any bug in my code? ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 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. |