Alibaba Cloud Git Bash ssh connection is often disconnected

Open sshd configuration file

sudo vim /etc/ssh/sshd_config

Find the following two lines

#ClientAliveInterval 0
#ClientAliveCountMax 3

Uncomment

ClientAliveInterval 30
ClientAliveCountMax 86400

centos7 restart sshd

sudo systemctl restart sshd.service

Start sshd

sudo systemctl start sshd.service

Set boot from boot

sudo systemctl enable sshd.service
Published 17 original articles · won praise 2 · Views 3873

Guess you like

Origin blog.csdn.net/weixin_42458562/article/details/105309176