I created an RSA key but SSH keeps asking the password
Solution 1:
Your key should go to .ssh/id_rsa
on the Mac, and id_rsa.pub
from the Mac should be added to the .ssh/authorized_keys
file on the server.
You should probably also chmod -R go-wr ~/.ssh
on the server.
Solution 2:
OpenSSH tutorial explains how to resolve this problem.
Chances are, your
/home/<user>
or~/.ssh/authorized_keys
permissions are too open by OpenSSH standards. You can get rid of this problem by issuing the following commands:chmod go-w ~/ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
Solution 3:
You want to connect to your Ubuntu Server without entering a password?
When you generate a new rsa keypair on your mac you end up with a private key (id_rsa
) and a public key (id_rsa.pub
). You'll find them in ~/.ssh/
by default.
Login into your ubuntu server and paste the content of id_rsa.pub
into ~/.ssh/authorized_keys
.
After this you should be able to connect without a password. On a standard ubuntu system you don't need to touch the sshd_config
at all.