服务端配置
sudo vi /etc/ssh/sshd_config
ClientAliveInterval 30     #服务端主动向客户端请求响应的间隔
ClientAliveCountMax 3    #服务器发出请求后客户端没有响应的次数达到一定值就自动断开
sudo restart ssh

 

客户端配置 
sudo vi /etc/ssh/ssh_config  #或~/.ssh/config

 

TCPKeepAlive=yes

ServerAliveInterval 30   #客户端主动向服务端请求响应的间隔

相关文章:

  • 2022-01-08
  • 2021-10-22
  • 2022-12-23
  • 2021-04-24
  • 2022-12-23
  • 2021-11-12
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2022-02-08
  • 2022-01-07
  • 2021-04-10
  • 2021-10-17
  • 2022-01-07
  • 2021-12-16
相关资源
相似解决方案