Cloud OFF switching window Tencent
1. Description scene reproduction
When using ssh or tty way, Tencent cloud server connection, if you switch to another window, or does not operate Tencent cloud, then a short time will time out.
For example, you cut to the website looked document, do take notes, cut come home and find connections and hung up.
really annoying ah ~ ~ ~
2. Solution
Find the following in the / etc / ssh / sshd_config file :( default, Tencent cloud, then at 113 and 114 lines on comments)
these two parameters back
# 每30秒向服务器发送一次心跳
ClientAliveInterval 30
# 360次心跳检测都没有得到响应的话,连接断开
# 上面设置的是30秒一次,所以这里360次就是3小时,具体数值看个人喜好
ClientAliveCountMax 360
After the setup is complete restart the ssh service
sudo systemctl restart sshd