I had this problem and none of the other answers solved it, although of course the other answers were correct.
In my case, it turned out that the /root
directory itself (not e.g. /root/.ssh
) had the wrong permissions. I needed:
chown root.root /root
chmod 700 /root
Of course, those permissions should be something like that (maybe chmod 770
) regardless. However, it specifically prevented sshd
from working, even though /root/.ssh
and /root/.ssh/authorized_keys
both had correct permissions and owners.