SSH Timeout setting

Source: Internet
Author: User

http://www.shocr.com/ssh-timeout/

Vim/etc/ssh/sshd_config

[Root@blinux ~]# defines how long a request for a client has not been received as a timeout, in seconds
Clientaliveinterval 600

[Root@blinux ~]# allows the timeout mentioned above, the default is 3
Clientalivecountmax 6

The product of the above two definitions is the time of timeout

Note that after you change the configuration, remember to reboot SSH

[Root@blinux ~]# Service sshd restart

Some people have doubts, directly increase the value of clientaliveinterval can not, why to modify the Clientalivecountmax?

In fact, you can do this. Think of the two ways the effect of the definition is different.

Take Clientaliveinterval * Clientalivecountmax 6 and Clientaliveinterval 1200 (note that the Clientalivecountmax default is 3)

The previous meaning is to allow 6 times 10 minutes without corresponding action, the meaning of the following is to allow 3 times 20 minutes without corresponding action.

Whether the difference is obvious, here they are willing to choose which to look at personal situation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.