用XSHELL鏈接linux服務器出現如下錯誤linux
Connecting to 42.51.xxx.xxx:22...shell
Connection established.服務器
To escape to local shell, press 'Ctrl+Alt+]'.ssh
Socket error Event: 32 Error: 10053.socket
Connection closing...Socket close.ide
Connection closed by foreign host.工具
Disconnected from remote host(42.51.xxx.xxx:22) at 20:00:30.rest
Type `help' to learn how to use Xshell prompt.rem
操做:用SSH工具鏈接linux電腦出現的問題:Read from socket failed: Connection reset by peerit
原由:改變了系統權限 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系統文件的權限請勿亂改。