Troubleshoot Mac SSH idle connection disconnection issues

Source: Internet
Author: User

Use terminal ssh to connect to the server, if there is no operation for a long time, it will be disconnected. If you want to use it, you have to re-login, which is very inconvenient, but also affect the development efficiency.

In view of this problem, theoretically, there are two kinds of schemes:

1. Modify the server Sshd_config file

2. Modify the user's CRT link how often to send a string

Modification of the server is unlikely, standing in the manager's perspective to think about the problem, to maintain long-time connection, consumption of resources, who also do not agree to let development do so.

Then change it from our client.

There are two ways to solve Mac

1, download SECURECRT, this terminal software can be set every time, send a string of empty characters, so as to ensure a long time connection with the server;

2, directly modify /etc/ssh/ssh_config file

Will

#Serveralivecountmax 3

#Serveraliveinterval 0

Note, and Serveraliveinterval 0 to Serveraliveinterval 5

parameter Description :

1, Serveralivecountmax 3: Indicates that the server makes a request after the client does not respond to a certain number of times, it automatically disconnects. Normally, the client does not respond;

2, Serveraliveinterval 0: Specifies the server-side request message to the client interval, the default is 0, not sent. Serveraliveinterval 5 means that every 5 seconds is sent to the server, which keeps the connection long.

Troubleshoot Mac SSH idle connection disconnection issues

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.