配置SSH免密登录,总是需要输入密码


生成秘钥:

ssh-keygen

发送到需要免密登录的机器:

ssh-copy-id node2

登录:

ssh node2

执行登录命令,总是需要输入密码。

查看日志发现,标有sshd的日志记录。

#cat /var/log/secure

Sep 10 11:09:09 localhost sshd[22432]: Authentication refused: bad ownership or modes for directory /root

 

解决方案:

chmod 0750 /root -R

 

 

参考:

https://blog.csdn.net/weixin_34124939/article/details/89827019

https://blog.csdn.net/lisongjia123/article/details/78513244

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM