ssh不操作一段时间就断开了

版权声明:转载请声明 https://blog.csdn.net/weixin_42451919/article/details/87005613

sudo vi /etc/ssh/ssh_config

添加

ServerAliveInterval 60
ServerAliveCountMax 3

上面一条表示每一分钟就通讯一次,被访问的主机会发送回复消息。下面一条表示如果有3次通讯都没有收到回复,则断开连接。

猜你喜欢

转载自blog.csdn.net/weixin_42451919/article/details/87005613