SSH Prompts for Password Even with Authorized Public Key

Last modified: 
Wednesday, February 3rd, 2016


You have added a valid public key to the remote user's authorized_keys file, but the server is still asking you to provide a password to login.


Fix permissions on your .ssh files.

sudo chown -R $(whoami):$(whoami) ~/.ssh
sudo chmod 700 ~/.ssh/
sudo chmod 600 ~/.ssh/authorized_keys

The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.