dsynb

Linux下设置超时时间,是在配置文件/etc/profile里。在该文件下,添加一个变量:

export TMOUT=3600

时间单位是S,上面配置的超时时间是1个小时。

另外,在ssh配置文件/etc/ssh/sshd_config中,将ssh的保活配置打开:

ClientAliveInterval 300

ClientAliveCountMax 3

意思是5分钟检查一次客户端响应,最多检查3次。如果3次都检查到客户端不响应,那么就认为ssh已经断开了。

 

 

转自飞鱼厅

分类:

技术点:

相关文章:

  • 2021-12-21
  • 2022-01-05
  • 2021-07-14
  • 2022-01-17
  • 2021-12-10
  • 2021-12-21
  • 2021-12-19
  • 2021-12-05
猜你喜欢
  • 2021-12-21
  • 2021-12-29
  • 2022-01-12
  • 2021-12-19
  • 2021-11-16
  • 2022-01-09
相关资源
相似解决方案