Originating From: http://blog.csdn.net/zljjava/article/details/20285679
1. Start with the client:
2. Start from the server (requires server permissions)
Modify/etc/ssh/sshd_config configuration file Clientaliveinterval 300 (default = 0)
This parameter means that every 5 minutes, the server sends a message to the client to keep the connection
Service sshd Reload in effect
CentOS 5 Remote SSH connection timeout setting
Operating system: CentOS 5.6SSH Version: OPENSSH_4.3P2
Many articles on the web say that the remote SSH connection timeout is in/etc/ssh/sshd_config, using the Clientaliveinterval and clientalivecountmax options, which I originally thought, However, the timeout has not been configured. today configuration, found this is not right, the correct configuration is in the/etc/profile, using the Tmout option to control, such as tmout=300, set the timeout interval of 300 seconds.
Resolve SECURECRT Connection Linux timeout after disconnecting