文档首页/
弹性云服务器 ECS/
故障排除/
远程登录/
Linux远程登录报错类/
使用SSH密钥无法登录,报错:Authentication refused: bad ownership or modes for directory /root
更新时间:2025-09-30 GMT+08:00
使用SSH密钥无法登录,报错:Authentication refused: bad ownership or modes for directory /root
问题描述
SSH密钥无法登录,报错Authentication refused: bad ownership or modes for directory /root
图1 SSH密钥无法登录
可能原因
根据日志报错,提示/root这个目录权限问题,排查/root目录,以及目录内的.ssh,.ssh目录内authorized_keys的权限以及属主属组。
处理方法
修改/root目录的权限以及属主属组后,SSH恢复正常。

父主题: Linux远程登录报错类