Linux密钥认证错误解决
问题描述:
Xshell用key认证登录,提示所选的用户密钥未在远程主机上注册
问题解决:
查看日志/var/log/secure,基本上都是用户根目录的权限问题
根据日志提示:
Authentication refused: bad ownership or modes for directory /root
说明root权限有问题:
chmod g-w /home/your_user
chmod 700 /home/your_user/.ssh
chmod 600 /home/your_user/.ssh/authorized_keys
借鉴:
https://www.daveperrett.com/articles/2010/09/14/ssh-authentication-refused/