I'm trying to setup password-less SSH login, and I can't seem to make it work. Here is what I have done so far:
- Used
ssh-keygen -t rsa
to generate a pair of keys - Created
~/.ssh/authorized_keys
on the server and dumped the public key in that file chmod 700 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
When I attempt to login with the private key I get the following output from ssh -vvv
:
debug1: Next authentication method: publickey
debug1: Trying private key: /path/to/private-key
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA [KEY_FINGERPRINT_HERE]
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: password,publickey
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
I'm pretty sure the server is running FreeBSD, but it's not mine, and I don't have root access. Any idea on what's going wrong here or what I can try to get this working?
ssh-copy-id -i key_name user@server
(you will use your login in password here, not your key password) , then ssh into the serverssh -i ~/.ssh/key user@server
If it works, disable your password. If that fails, post the command you use and make sure you are using the correct password..ssh
folder, generated a fresh pair of keys, and usedssh-copy-id
to transfer the public key to the server. It created a.ssh
folder and anauthorized_keys
file, but I still can't log in with the private key. So frustrating. Which command did you want me to post?