set ubuntu ssh timeout
ssh 客户端
ServerAliveInterval 100
In Linux this could be set globally in /etc/ssh/ssh_config or per-user in ~/.ssh/config. It could also be used in the command line as an argument as in the following example;
临时
ssh -o ServerAliveInterval=100 user@example.com
服务器端
/etc/ssh/sshd_config
ClientAliveInterval 600
TCPKeepAlive yes
ClientAliveCountMax 10