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