Wednesday, July 01, 2009

Permission to Land

Last week, I installed CentOS on my old tower. The installation was a breeze. However, afterward, I was annoyed to find that sshd prompted me for a password, even though I had appended my public key to ~/.ssh/authorized_keys on the server. As it often is, the solution was simple.

I spotted the problem in /var/log/secure:

Jul 1 22:08:44 madhatter sshd[25996]: Authentication refused: bad ownership or modes for file /home/josh/.ssh/authorized_keys

I had the wrong permissions on my .ssh directory and my authorized_keys file.
chmod 755 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
did the trick.

No comments: