Fixing Authentication refused: bad ownership or modes for directory

By Lowell Heddings on July 16th, 2010

If you get this error in your logs when trying to setup public key authenticated automatic logins, the problem is a permissions one.

You’ll need to perform the following commands on the user account you are trying to setup:

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 07/16/10
More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!