in reply to How to connect to SFTP via OpenSSH
So what I don't understand is what do I pass into the sftp() method that ssh is calling?
Net::SFTP::Foreign constructor supports several optional parameters besides those that define how to connect to the remote host (i.e. autodie, autoflush, etc.). These are the arguments you can pass into Net::OpenSSH sftp method. Passing nothing as you are doing in your script is also right.
The problem with your script is that it fails to establish the SSH connection. Follow tangent advice above and correct the way you check for errors.
|
|---|