vim /etc/ssh/sshd_config

找到下面两行:

#ClientAliveInterval 0
#ClientAliveCountMax 3

去掉注释,改为:

ClientAliveInterval 30
ClientAliveCountMax 1800

这两行的意思分别为:

1、客户端每隔多少秒向服务发送一个心跳数据
2、客户端多少秒没有相应,服务器自动断掉连接

重启SSHD服务

service sshd restart

相关文章:

  • 2021-05-09
  • 2022-12-23
  • 2021-09-03
  • 2022-01-29
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2021-09-22
  • 2021-11-21
  • 2021-08-02
  • 2021-03-30
  • 2021-08-05
相关资源
相似解决方案