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.