修改ssh服务端配置

sudo vim /etc/ssh/sshd_config

增加

ClientAliveInterval 30
ClientAliveCountMax 6

ClientAliveInterval 表示每隔多少秒,服务器端向客户端发送心跳,是的,你没看错。

ClientAliveCountMax 表示上述多少次心跳无响应之后,会认为Client已经断开。

重启ssh

# service sshd restart
Redirecting to /bin/systemctl restart sshd.service

相关文章:

  • 2021-11-18
  • 2021-07-11
  • 2021-12-05
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-12-10
  • 2021-11-29
  • 2022-12-23
  • 2021-12-30
相关资源
相似解决方案