xshell连接突然报Connection closed by foreign host.

1问题描述报错
Connection closed by foreign host.
Disconnected from remote host(yaoGS) at 155513.
xshell连接突然报Connection closed by foreign host.

2登入虚拟机
在linux系统操作中,经常需要连接其他的主机,连接其他主机的服务是openssh-server,它的功能是让远程主机可以通过网络访问sshd服务,开始一个安全shell
启动sshd服务
service sshd start
3 sshd-t测试没有问题
4尝试连接
xshell连接突然报Connection closed by foreign host.

5还是没有解决,这个时候可能是ip冲突了
可以尝试改变网卡的ip
xshell连接突然报Connection closed by foreign host.
6改变
xshell连接突然报Connection closed by foreign host.
7重启网卡service network restart
xshell连接突然报Connection closed by foreign host.