Ok, I admit it was a very bad post I should have been more descriptive as to what I want to do.
Net::SFTP::Foreign does not have a password variable but the author gives an example of automating login by using Expect. I tried this and failed but the author recommends using public-key authorization to do this instead. the only thing I could find on this is in the Net::SSH::Perl:: Auth::PublicKey module. But when I went to install it I got those errors. Is there any other way to do this? | [reply] |
You should be able to use Net::SFTP::Foreign with public key authentication, but first...
You will need to install an appropriate version of ssh (say, openssh) and set up its public keys. For openssh, use ssh-keygen. See the section "Linux and Windows OpenSSH to OpenSSH (ssh2)" at http://www.mines.edu/~gmurray/HowTo/sshNotes.html for the basic procedure; do check for the correct file permissions, though - see the answer to item 3.14 in http://www.openssh.org/faq.html#3.14.
Once all that is set up correctly, you should be able to enter "ssh -v userid@my.host.name" and log in with public key authentication. If that works, Net::SFTP::Foreign should be straightforward.
| [reply] |