用xshell连接linux服务器出现以下错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用xshell连接linux服务器出现以下错误相关的知识,希望对你有一定的参考价值。

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

以上是关于用xshell连接linux服务器出现以下错误的主要内容,如果未能解决你的问题,请参考以下文章

xshell连不上服务器怎么弄

为啥用xshell连接kali显示 ssh拒绝访问

用xshell连接Linux,我想主动断开连接,改用啥命令?

使用Xshell连接虚拟机Linux系统

用xshell远程连接linux服务器,sh命令启动一个服务后,如果关掉xshell,这个服务也会跟着停止了

怎样用xshell连接一个linux机器