
Need some help? We are here for you!We have a very friendly service - Come and chat to us and let us know what you need, we work for an hourly fee and can also provide you a no obligation quote and begin work immediately in most cases. Click "Request Support" or use our Live Chat.
Request support
This article explains how to increase the SSH timeout length on CentOS servers. In this example CentOS 6.7 is used. The first thing you need to do is edit the file located /etc/ssh/sshd_config
nano /etc/ssh/sshd_config
Uncomment these lines: (Located nearer the bottom of the file)
#ClientAliveInterval 0 #ClientAliveCountMax 3
Now edit the values so they look something more like this
ClientAliveInterval 180 ClientAliveCountMax 10
ClientAliveInterval 180 would result in SSH sending KeepAlive packets in 180 second intervals. Should SSH not recieve a response back back from the client then it will retry a further 10 times, which is what ClientAliveCountMax 10 is for. It is the number of KeepAlive retries. So overall using these values it should stay open for 30 minutes after your last interaction. Finally, you should now restart the ssh service:
service sshd restart
The response should be:
Stopping sshd: [ OK ] Starting sshd: [ OK ]
Need some help? We are here for you!We have a very friendly service - Come and chat to us and let us know what you need, we work for an hourly fee and can also provide you a no obligation quote and begin work immediately in most cases. Click "Request Support" or use our Live Chat.
Request support