Ssh gets disconnected after idle.

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.

Were you on the same network?

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!

Why not disown the job completely so that doesn't happen?

nohup program </dev/null > program.log 2> program.err & disown

You can quit your terminal without killing the job.

What is your IP address before and the next day? Is it possible that it changes?

This is the message I saw this morning:

packet_write_wait: Connection to 192.168.1.84 port 22: Broken pipe

I believe the IP address are the same before and after as I was told each server has consistent static IP.
I will try your method.

Is there a firewall in between?

I don't think so. Confirmed with my admin there is no firewall for the connections.