Linux ssh 保持连接

Client

From client, you can set this config to hold all the connection with servers.

1
2
vim ~/.ssh/config
ServerAliveInterval 60

Server

From server, you can hold all the connection with clients.

1
2
vim /etc/ssh/sshd_config
ClientAliveInterval 60