Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got about a dozen servers that I log into via an authorised ssh key, and up until today it was working fine. Today, one of those servers refuses to accept my key - it accepts a root key and my passphrase, just not my key. Nothing has changed in the ssh configs, and the key is still in my authorized_keys. Any idea why it's stopped working?

share|improve this question
up vote 2 down vote accepted
  • .ssh directory chmod 700?
  • .ssh/authorized_keys chmod 600?

owned by you?

If the server sshd_config wasn't changed and the other keys work, I would suspect something happened to the directory or permissions that contain your key.

share|improve this answer
.ssh is 0700, authorized_keys is 0600. Both owned by me. – Andrew Jul 1 '10 at 2:49
key matches? anything in the auth logs? – karmawhore Jul 1 '10 at 2:53
Authentication refused: bad ownership or modes for directory /home/<username>. Currently 0770. – Andrew Jul 1 '10 at 3:08
I believe the group writeable may be what caused it to decline. Try chmod 750 and ls -ald /home/username to make sure the uid/gid exist. – karmawhore Jul 1 '10 at 3:13
Aha! Fixed! Excellent. Group writable was it. – Andrew Jul 1 '10 at 3:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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