How to Fix "SSH Public Key Authentication Failed"

If your SSH public key authentication is failing with errors like this:

$ ssh -vvv myhost.com
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/kitamura/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply

…try these permissions on the server:

server$ chmod go-w ~/    (same as 755)
server$ chmod 700 ~/.ssh
server$ chmod 600 ~/.ssh/authorized_keys

more troubleshooting tips

This entry was posted in Linux, SSH, Troubleshooting. Bookmark the permalink.

One Response to How to Fix "SSH Public Key Authentication Failed"

  1. JamesD says:

    Thanks for the useful info. It’s so interesting

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>