When SSH connection to the server, not a long time will be disconnected operation solutions

Recently in the configuration server-related content, when different things does not lead to long operation, the page disconnected, can not operate, can only close the window, and finally resolved by the following command.

When SSH connection linux, for a long time does not operate on disconnected solutions:

1, modify / etc / ssh / sshd_config file, and if ClientAliveInterval 0 ClientAliveCountMax 3 and comment symbol ( "#") found removed,

The ClientAliveInterval corresponding to 0 to change into a numerical value such as 60, the value is the second
ClientAliveInterval specified time server to the client request message interval, the default is 0, is not transmitted.
ClientAliveInterval 60 denotes a transmission once a minute, then the client response, and remains a long connection.
ClientAliveCountMax, the default value of 3 to a rear .ClientAliveCountMax client server request frequency reaches a certain value is not responding, it is automatically disconnected, under normal circumstances, the client does not respond.

2, is not found after finding the ClientAliveCountMax ClientAliveInterval and attributes, then the file is added, the content of the attribute values ​​with reference to step 1.

ClientAliveInterval 60
ClientAliveCountMax 3

3, restart sshd service:

service sshd restart
after configuration changes to make the configuration take effect, you have to restart the sshd service.

 

 

 

Turn  https://www.cnblogs.com/lph970417/p/11424917.html

Guess you like

Origin www.cnblogs.com/ygyy/p/12416052.html