How to Extend SSH Timeout on CentOS 6.5 Server

How to Extend SSH Timeout on CentOS 6.5 Server
By Shay Anderson on March 2014
This article explains how to extend the default timeout time for SSH on CentOS 6 servers (in this example CentOS 6.5).

First, edit the file /etc/ssh/sshd_config: # nano /etc/ssh/sshd_configUncomment these lines: #ClientAliveInterval 0
#ClientAliveCountMax 3And change values so they look like: ClientAliveInterval 120
ClientAliveCountMax 10
The 120 value for ClientAliveInterval means SSH will send KeepAlive packets in 120 second intervals. If SSH doesn’t receive a response back from the client the 10 value for ClientAliveCountMax means SSH will retry sending up to 10 times.

Finally, restart the SSH service: # service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]

http://www.shayanderson.com/linux/how-to-extend-ssh-timeout-on-centos-6-5-server.htm