Posted on 2009-11-27 10:20:03-08 by rajeev
Net::Sftp::Foreign hangs when try to connect with the passwaord
hi , i am usinfg Net::Sftp::Foreign and when i am tring to connect using the hostname,user,password it hangs and does not response . please help its very urgent for me. Code: eval { my $sftp = Net::SFTP::Foreign-new( host =$target_host, user = $username, password = $password, timeout = $seconds, more = [qw(-i /home/user/.ssh/my_priv_key)] ); print "connecting..........."; $sftp-error and die "SSH connection failed: " . $sftp-error; if ($sftp) { print "Connected".$sftp-error; } }; if($@) { print "error is ".$@; } was not accepting by the portal.
Direct Responses: 11843 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.