配置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