http://www.perlmonks.org?node_id=1022956


in reply to sftp connection through perl

It seems the slave SSH client process is asking for some confirmation on STDIN (that's wrong, it should be using /dev/tty). Probably, the remote host key is unknown to it and it is asking you about its validity.

Which SSH software and version are you using (ssh -V)? what is your OS?

The easiest solution to that problem would probably be to install OpenSSH and tell Net::SFTP::Foreign to use it.