Web Design. Web Development. Web Hosting.
0 items

How to Extend SSH Timeout on CentOS Server

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 ]
0 0 votes
Article Rating
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
Author: Josh BurleyOver 10 years software and website development, more recently moving into app development. Became a founding member and managing partner of WebDesires in late 2014 early 2015. Now dedicate most of my time to the company and helping us grow into the industry.


Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments


Share this page..

Let's begin your journey...

Get in touch us now to begin your journey to having a beautifully crafted mobile responsive website. If you're still unsure what we could do for you then take a look at our why us page which includes reviews, or take a look at our portfolio.

We can work on improving existing websites or craft a new stylish website making your business stand out.

You could always catch us by email, telephone, Skype or live chat to us below.


    0
    Would love your thoughts, please comment.x
    ()
    x