in reply to Net-SFTP-Foreign not reading /etc/hosts file?
Anyway, set debugging on for Net::SFTP::Foreign adding the following line at the beginning of your script:
... and then run it and post here the debugging output.$Net::SFTP::Foreign::debug = -1;
There should be a line indicating how ssh is called, similar to ...
You can also try running that command but without the -s sftp part, at the shell. Does it work? if it doesn't you should start by figuring out why not.#18146 1442165394.00000 _init_transport: ssh cmd: ssh -o NumberOfPassw +ordPrompts=1 -o PreferredAuthentications=keyboard-interactive,passwor +d foo.bar.com -s sftp
Finally, if you want compatibility with Net::SFTP, you should go for Net::SFTP::Foreign::Compat instead of Net::SFTP::Foreign.
|
|---|