Fixing Authentication refused: bad ownership or modes for directory

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

ncG1vNJzZmivp6x7qbvWraagnZWge6S7zGhob3BhaoNwssixoKefXZbCtbTEp6uim5GptrC6jKucn62jmrFursCdZKivnpq%2FtLTIqWSoql2ivKWx0madqKpdmbazscKtpquxXw%3D%3D