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

What happens when you run that command from the command line?

Add -vvv in order to see what is happening inside ssh:

ssh -i /home/fds/apfh/FDSnse_fh/etc/id_rsa -p 6010 -o NumberOfPassword +Prompts=1 \ -o PreferredAuthentications=publickey,keyboard-interactive,passwor +d \ -l F***EMD 121.241.2.65 -vvv -s sftp
It should hang once the connection is established, waiting for data.

Replies are listed 'Best First'.
Re^7: Issue in SFTP connection using Net::SFTP::Foreign-
by iit2011101 (Novice) on Jun 21, 2016 at 13:03 UTC
    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.
      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.