My SSH to server got frozen after idle for a couple of hours.
My related configuration are:
In my /etc/ssh/sshd_config:
------------------------------------------
ClientAliveInterval 30
ClientAliveCountMax 4
TCPKeepAlive yes
------------------------------------------
and my ~/.ssh/config:
---------------------------------------------
Host *
ServerAliveInterval 30
TCPKeepAlive yes
------------------------------------------
Even my admin does not have any idea about this.
My client is Ubuntu17.10 and the server is Debian 4.7.8-1. Both are x86_64 GNU/Linux.
Any diagnosis on this problem is greatly appreciated.
Yes.
We are in a small cluster that have ~10 servers. He had exactly problem.
It frustrated me in this way: I send my job to the background to let it run overnight, but the next morning I found out the job died (and SSH is disconnected) in the evening ~19:30pm when it is after 2.5 hours off work.
Last night I used tmux, and it improved that the background job is still running even the tmux is frozen (my SSH connection is lost for sure!) as before. Could not figure out why.
Thank you by the way!