service sshd reload
文件在 vi /etc/ssh/sshd_config
TCPKeepAlive yes # 保持TCP连接
ClientAliveInterval 60 # 设置连接保持的时间,单位是秒
ClientAliveCountMax 3600
interval为活跃时间 一般不建议超过5分钟 不然配置一直失效
countmax 这个可以弄長点 登陆保持时间为 interval*countmax 单位秒
service sshd reload
文件在 vi /etc/ssh/sshd_config
TCPKeepAlive yes # 保持TCP连接
ClientAliveInterval 60 # 设置连接保持的时间,单位是秒
ClientAliveCountMax 3600
interval为活跃时间 一般不建议超过5分钟 不然配置一直失效
countmax 这个可以弄長点 登陆保持时间为 interval*countmax 单位秒