On Linux systems, if SSH does not work for a long time, the request timeout will be automatically disconnected. How do you set it up so that the SSH connection does not automatically disconnect? The following small series will introduce you to the Linux SSH timeout automatic disconnection solution.
Solution:
Solve the problem of automatic disconnection by modifying the configuration in /etc/ssh/sshd_config. The following are the meanings of the two configuration items to be modified:
“ClientAliveInterval specifies the interval at which the server requests a message from the client. The default is 0, not sent. The ClientAliveInterval 60 means that it is sent once every minute, and then the client responds, so that the long connection is maintained. The strange thing here is that instead of the client actively initiating a request to keep a connection (such as FTerm, CTerm, etc.), the server needs to be active first.
In addition, as for ClientAliveCountMax, the default value of 3 can be used. ClientAliveCountMax means that the number of times the client does not respond after the server makes a request reaches a certain value and is automatically disconnected. Under normal circumstances, the client will not respond. “
1 View current configuration
grep“ClientAlive& rdquo; sshd_config
#ClientAliveInterval0
#ClientAliveCountMax3
2 Back up the original file< Br>
cp sshd_configsshd_config.bak
3 Modify the configuration file
sed-i “s/#ClientAliveInterval 0/ClientAliveInterval 60/g” sshd_config
sed - i “s/#ClientAliveCountMax3/ClientAliveCountMax 3/g” sshd_config
4 Verify the modification result
grep“ClientAlive& rdquo; sshd_config
diff sshd_configsshd_config.bak
5 Restart the service
service sshdrestart
The above is the solution to the Linux SSH timeout disconnection. Through the settings in this article, no matter whether SSH times out or not, it will not be disconnected. Need to be disconnected automatically and can be set back.
Does the Linux system have a recycle bin? The answer is no, Linux system does not have a recycle bin
Many users want to install a tool to view chm under Ubuntu. The chmsee in deepin is a relatively goo
For those who have Windows and Linux dual systems, the trouble is the use of docume
In the previous tutorial, we mentioned that using the top, vmstat and other command
What can I do if I can't access mysql under Linux?
Linux using LGOGDownloader to download GOG games skills
Linux beginners need to understand the Bash command operation skills to share
How to edit the start menu under Ubuntu?
What should I do if a Linux normal user does not have permission to use the command?
Linux bash shell vulnerability detection and repair method
Linux installation using the monitoring software Collectl method
How to use Linux to use rsync command to delete small files in batches
How to find executable files under Linux system
What should I do if the Linux runlevel is set to 6 and then restart infinitely?
Ubuntu wireless network card search can not find a solution
What should I do if the ASUS F81se computer installs Ubuntu 12.04?
Windows Phone system start menu background how to change
How to find the win7 system compatibility mode?
Teach you how to merge disk partitions in Windows 7 system
Win8 credential manager upgrade account password easy backup and restore
How to view the computer usage record of WinXP system? XP system computer use record viewing method
How to batch delete the useless files in the compressed package
What should I do if the Windows 8 system enters the desktop and the syslevelup prompt pops up?
How to solve WinXP delete files when the system prompts the recycle bin is corrupted