Authentication refused: bad ownership or modes for directory

When you cannot remote login to a server with public/private key authentication and you’ll get following error:

Apr 28 12:02:54 server sshd[30793]: Authentication refused: bad ownership or modes for directory /user

Execute following on the user (you use t login) his home directory

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