阿里云Git Bash ssh连接经常断线

打开sshd配置文件

sudo vim /etc/ssh/sshd_config

找到下面两行

#ClientAliveInterval 0
#ClientAliveCountMax 3

取消注释

ClientAliveInterval 30
ClientAliveCountMax 86400

centos7重启sshd

sudo systemctl restart sshd.service

启动sshd

sudo systemctl start sshd.service

设置开机自启

sudo systemctl enable sshd.service
发布了17 篇原创文章 · 获赞 2 · 访问量 3873

猜你喜欢

转载自blog.csdn.net/weixin_42458562/article/details/105309176