How to avoid SSH Secure Shell Client connection Linux timeout, auto disconnect?

Source: Internet
Author: User
Tags ssh secure shell

General modifications two places can solve this annoying problem

1. Echo $TMOUT

If blank is displayed, it means that there is no setting, equal to using the default value of 0, and should normally not time out. If it is greater than 0, you can set it to 0 in a file such as/etc/profile.

2, modify the/etc/ssh/sshd_config file , the Clientaliveinterval 0 and Clientalivecountmax 3 of the annotation symbols removed, Change the clientaliveinterval corresponding 0 to 60,clientaliveinterval specifies the time interval of the server-to-client request message, which is 0 by default and not sent. and clientaliveinterval 60 means send every minute, The client then responds so that it remains long connected. Clientalivecountmax, use the default value of 3.


Finally remember to execute/etc/init.d/sshd restart Oh, otherwise the amendment will not be effective.

How to avoid SSH Secure Shell Client connection Linux timeout, auto disconnect?

Related Article

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.