linux - SSH connection to the server gets stuck after a period of inactivity. What's going on?
仅有的幸福
仅有的幸福 2017-05-16 13:21:20
0
1
682

Connected to the server through ssh from the terminal. There was no operation for a period of time. When I tried to operate again, I found that it was stuck. I could only exit and reconnect.
What's going on? Did the connection disconnect itself?

仅有的幸福
仅有的幸福

reply all(1)
我想大声告诉你

It seems that you are using a linux system
This is a security issue of linux. If no data is used within 60s, it will be automatically disconnected.
So you found the card owner~~~

Solution

#本地
#打开
sudo vim /etc/ssh/ssh_config
# 添加
ServerAliveInterval 50
ServerAliveCountMax 3 

#远程
# 打开
sudo vim /etc/ssh/sshd_config
# 添加
ClientAliveInterval 50
ClientAliveCountMax 3 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template