SSH remote host access timeout

Source: Internet
Author: User

The purchased server is on the remote end, and SSH is often required. After a period of time, no matter whether the terminal is stuck, the connection is actually disconnected. The user experience is very poor, so no timeout is set directly. The method is as follows:

 

Modify the ETC/ssh/ssh_config on the client and add the following: (if you do not have the permission to modify the server configuration)

Serveraliveinterval 60 # the client sends a request to the server every 60 seconds, and then the server responds to the request to keep the connection

Serveralivecountmax 3 # after the client sends a request, if the server does not respond 3 times, the connection is automatically disconnected. Normally, the server does not respond.

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.