I generated the keys using ssh-keygen. Then shared my public key to authorized_keys. It is prompting for the password despite of sharing the public key

Permission of authorized_keys

-rw-rw-r-- 1 hadoop hadoop 397 Jul 26 18:24 authorized_keys

Kindly help

  • 1
    please share the output of ssh -vv ... – Diego Roccia Jul 26 '17 at 15:27

The authorized keys must have 640 permission in order to be used, otherwise the sshd ignores it. Try chmod 640 authorized_keys and chmod 700 .ssh on the .ssh folder under the user you are trying to login with.

See an example here SSH login without password

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.