Linux SSH免密码登录还提示密码 / ssh的免密码登陆不生效

有关SSH免密基本配置这里不再介绍,请直接查百度。

Authentication refused: bad ownership or modes for file

使用:tail /var/log/secure -n 20 若出现 “Authentication refused: bad ownership or modes for file ” 则需要设置相关目录或文件权限,详细如下:

  • 用户目录权限为 755 或者 700就是不能是77x
  • .ssh目录权限一般为755或者700
  • rsa_id.pub 及authorized_keys权限一般为644
  • rsa_id权限必须为600

猜你喜欢

转载自my.oschina.net/kind790/blog/1635660
今日推荐