samueladam.net

from belgium import beer

Passwordless logins with SSH and a Public Key

written by samuel, on 2008-03-06 12:32.

Little tutorial on how to connect to a remote server without password.

Share your Public Key

When generating your public key, leave the passphrase blank.

If you want more security, enter a passphrase and use ssh-agent for automatic logins.

ssh-keygen -t dsa
# leave the passphrase blank
ssh-copy-id -i ~/.ssh/id_dsa.pub remote-user@remote-host
ssh remote-user@remote-host

Reload sshd on the remote host

ssh remote-user@remote-host
# Enter your password
sudo /etc/init.d/ssh reload

Now, you should be able to login or excute commands on the remote host without any password.

Bookmarks

Leave a Reply