Guides & Tutorials: Securing Your Server
Adding a New User
Works fine
Using SSH Key Pair Authentication
In a terminal on my Mac, changing example_user, IP address as appropriate:
ssh-keygen
scp ~/.ssh/idrsa.pub exampleuser@123.456.78.90:
In a terminal to my server
mkdir .ssh
mv idrsa.pub .ssh/authorizedkeys
chown -R exampleuser:exampleuser .ssh
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
The guide says:
"The SSH keys have been generated, and the public key has been installed on your Linode. You’re ready to use SSH key pair authentication! To try it, log out of your terminal session and then log back in. The new session will be authenticated with the SSH keys and you won’t have to enter your account password."
I cannot get past this stage. Any new session is not authenticated with the SSH keys. Any guidance what I am doing wrong?
Thanks
2 Replies
otherwise, the ssh process cannot load your public key for authentication
Edit: I take that back… man pages recommend 600 (so the problem is elsewhere)
try checking the output of
$ ssh -vv example_user@server_ip