Although these lines are present in my server's /etc/ssh/ssd_config

RSAAuthentication yes
PubkeyAuthentication yes

when trying to login to the above server by explicitly providing a private key to use for authentication, I am prompted for a password:

$ ssh -i ~/Desktop/some_id_rsa myusername@server-hostname
myusername@server-hostname's password: 
  • Is your public key referenced in the authorized public keys on the server in .ssh/authorized_keys ? Sep 14 '18 at 12:19
  • yes it has been added in /home/myusername/.ssh/authorized_keys
    – pkaramol
    Sep 14 '18 at 12:20
  • 1
    Look at the output of ssh -vvv ...
    – jimmij
    Sep 14 '18 at 12:22

Kindly change the permission of authorized_keys

chmod 600 ~/.ssh/authorized_keys

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.