ssh without password on Ubuntu Jaunty
Mostly lifted from here but for my own notes.
- On client, run
ssh-keygen
Do not supply a passphrase. This creates a keypair in~/.ssh
. - Copy the newly created file
id_rsa.pub
to server.scp -P 22 .ssh/id_rsa.pub bob@server:~/
- On server, append
id_rsa.pub
to file~/.ssh/authorized_hosts
(or create if does not exist).cat id_rsa.pub >> .ssh/authorized_hosts
- (Important) On server, in
/etc/ssh/sshd_config
change "StrictModes yes" to "StrictModes no". - Restart sshd.
sudo /etc/init.d/ssh restart
- On client, try logging in:
ssh -p 22 bob@server