On Sat, 2004-09-04 at 09:12, Graham wrote:
Can anyone explain to a novice the way to automate an sftp batch session without the need to supply a password each time? The manpage refers me to sshd and says I need to configure public key authentication, but what does that mean in practical, step-by-step terms?
sftp operates on top off ssh, so you need to set it up so you can ssh without a password. Basically you do 'ssh-keygen', which generates a private and a public key in separate files into your ~/.ssh/ directory. Then you copy your public key (~/.ssh/id_dsa.pub) into the ~/.ssh/authorized_keys file on the remote system.
If you want to login to the same remote system from other machines, either copy your ~/.ssh to those other machines, or repeat the process above on the other machines and append the new public keys to the remote ~/.ssh/authorized_keys file.
Google finds various pages with more relevant info: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen http://www.cs.umd.edu/~arun/misc/ssh.html http://www.openssh.com/faq.html
-- Martijn