ssh connection time out code example
Example 1: ssh connection timeout
$ sudo vi /etc/ssh/sshd_config # in server
#Add the following
ClientAliveInterval 1200
ClientAliveCountMax 3
$ sudo systemctl reload sshd
# Remember timeout value in seconds = ClientAliveInterval * ClientAliveCountMax
Example 2: ssh connection timeout
ClientAliveInterval 1200
ClientAliveCountMax 3
Example 3: ssh connection timeout
$ sudo vi /etc/ssh/sshd_config