in reply to Re^6: Issue in SFTP connection using Net::SFTP::Foreign-
in thread Issue in SFTP connection using Net::SFTP::Foreign-

Yup its hanging for some seconds and then connection is getting closed by the remote host Connection to 121.241.2.65 closed by remote host.
  • Comment on Re^7: Issue in SFTP connection using Net::SFTP::Foreign-

Replies are listed 'Best First'.
Re^8: Issue in SFTP connection using Net::SFTP::Foreign-
by salva (Canon) on Jun 21, 2016 at 13:17 UTC
    But can you post the output?

    How long does it take the remote side to close the connection?

      Oh, wait, you are passing a password but using public key authentication. That's the problem!

      Remove the password option from the constructor.

        Thank you so much :) It worked