I'm trying to SSH into my remote VPS with Debian onboard. Running sshd in debug mode, I found that:
Authentication refused: bad ownership or modes for directory /root
I tried setting permissions as I found in Google:
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
But it still refuses auth with pubkey and asks for password, with the same message in debug. What am I doing wrong?
ls -ld /root– Jeff Schaller Oct 23 '19 at 12:56/roothere) must only be readable to you, sogo-wmay not be enough. – Jeff Schaller Oct 23 '19 at 12:57~/is. Dochmod go-w /root/, etc. And as @JeffSchaller requests, edit your post to add the output ofls -ld /rootandls -ld /root/.ssh– Jim L. Oct 23 '19 at 18:06ssh.service: Found left-over process 1704 (sshd) in control group while starting unit. Ignoring.andThis usually indicates unclean termination of a previous run, or service implementation deficiencies.– Seiden Mar 03 '23 at 07:05