I’ve been struggling (albeit not spending too much time) working on an issue on a Gutsy Server problem I’ve had. From one day to the next my SSH logins started asking me for a password. I had set up password-less logins with SSH keys.

In the logs I kept getting:

Authentication refused: bad ownership or modes for directory /home/username

It should have been a clue really… I checked and double checked that $HOME/.ssh might not be set to 0700, or the authorized_keys file might not be set to 0600. No joy… But the clue was really in the error. It was the ownership of my entire home directory, which although the owner is me and the group is also my username it apparently wasn’t good enough.

So chmod 700 /home/username fixed it…

Annoyingly easy !

UPDATE: Check no one has added themselves to your group in /etc/group… yep it’s a *special* account used by a couple of us, and one of the guys had added his own account to the group… tut tut 😉

That would explain the “Working From One Day To The Next” scenario !

Advertisements