1.
vim /etc/ssh/ssh_config
添加:
ServerAliveInterval 50
ServerAliveCountMax 3
2.
vim /etc/ssh/sshd_config
添加:
ClientAliveInterval 50
ClientAliveCountMax 3
3.重启ssh服务器
service sshd restart
(或者service ssh restart)
2022-04-21 07:36:37
1.
vim /etc/ssh/ssh_config
添加:
ServerAliveInterval 50
ServerAliveCountMax 3
2.
vim /etc/ssh/sshd_config
添加:
ClientAliveInterval 50
ClientAliveCountMax 3
3.重启ssh服务器
service sshd restart
(或者service ssh restart)