AbsolutelyPerfect

还是第一次出现这个问题。

使用last命令

root     pts/3        112.41.50.242    Mon Jan 15 08:22   still logged in
root     pts/2        112.41.50.242    Mon Jan 15 08:16   still logged in
root     pts/1        112.41.50.242    Mon Jan 15 08:14   still logged in
root     pts/3        112.41.50.209    Sat Jan 13 23:43 - 00:45 (1+01:02)
root     pts/2        112.41.50.209    Sat Jan 13 23:41 - 00:45 (1+01:04)
root     pts/1        112.41.50.209    Sat Jan 13 23:39 - 00:45 (1+01:06)

有可能是网络ip地址变化导致xshell自动断开连接,修改本机ip为固定地址即可。

还可能是本机网络dns变化导致xshell自动断开连接,修改ssh配置文件将其中“UseDNS yes”去掉注释并改成no即可,过程如下。

vim /etc/ssh/sshd_config
...
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
...

重启系统即可。

参考

http://blog.csdn.net/iamoldpan/article/details/77595624

http://blog.csdn.net/baidu_19473529/article/details/52870244

 

分类:

技术点:

相关文章:

  • 2021-12-27
  • 2021-05-01
  • 2021-06-27
  • 2022-01-20
  • 2021-04-04
  • 2021-11-28
  • 2021-05-30
  • 2021-06-04
猜你喜欢
  • 2021-07-02
  • 2021-04-17
  • 2022-12-23
  • 2022-02-22
  • 2021-07-29
  • 2021-11-30
相关资源
相似解决方案