$ find / -name "ssh_config"
it will tell where is it, such as /etc/ssh/sshd_config
$ sudo vim /etc/ssh/sshd_config
and find
#ClientAliveInterval 0
#ClientAliveCountMax 3
at centos 8, it at line 122(about at the end).
ClientAliveInterval means timeout to reactive connect, if its value equals to 0, it disables, so you can set 15, which means 15 seconds. ClientAliveCountMax is the reactive times, you can set it to 10.
such as:
ClientAliveInterval 15
ClientAliveCountMax 10
which means the terminal will reactive connection ever 15s, if the host doesn't respond, it will try 10 times.