用xshell連接linux服務器失敗 Could not connect to '112.74.73.194' (port 22): Connection failed.


用XSHELL連接linux服務器出現以下錯誤

Connecting to 42.51.xxx.xxx:22...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.

Socket error Event: 32 Error: 10053.

Connection closing...Socket close.

Connection closed by foreign host.

Disconnected from remote host(42.51.xxx.xxx:22) at 20:00:30.


Type `help' to learn how to use Xshell prompt.

操作:用SSH工具連接linux電腦出現的問題:Read from socket failed: Connection reset by peer

起因:改變了系統權限 chmod 777 -R 

解決辦法:#chmod 400 /etc/ssh/*

重新連接 成功!!!

重啟SSH

service sshd restart
注意:修改# chmod 770 /etc/ssh/ssh_host_dsa_key.pub

          # chmod 770 /etc/ssh/ssh_host_rsa_key.pub

重啟網關

service network restart

忠告:linux系統文件的權限請勿亂改。


免責聲明!

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



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