Read from socket failed: Connection reset by peer


這是我在ssh localhost的時候出現的問題 

在網上搜了下解決方法,試了下各種方法包括重裝ssh,但是還是不行。

最后老老實實看/var/log/auth.log

錯誤顯示

error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
error: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
error: Permissions 0777 for '/etc/ssh/ssh_host_dsa_key' are too open.
error: It is recommended that your private key files are NOT accessible by others.
error: This private key will be ignored.
error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
error: Could not load host key: /etc/ssh/ssh_host_dsa_key


error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ error: Permissions 0777 for '/etc/ssh/ssh_host_rsa_key' are too open. error: It is recommended that your private key files are NOT accessible by others. error: This private key will be ignored. error: bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key error: Could not load host key: /etc/ssh/ssh_host_rsa_key error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ error: Permissions 0777 for '/etc/ssh/ssh_host_dsa_key' are too open. error: It is recommended that your private key files are NOT accessible by others. error: This private key will be ignored. error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key error: Could not load host key: /etc/ssh/ssh_host_dsa_key

遂修改相應權限

我改得是 chmod 700 /etc/ssh/ssh_host_dsa_key

其他類似。。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM