用xshell链接linux服务器出现如下错误

用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系统文件的权限请勿乱改。