本地和远程操作系统都是Debian8。
我想让 ssh 保持很长时间。我的客户端(本地)端
的配置文件/etc/ssh/ssh_config
。
Host *
ServerAliveInterval 60
ServerAliveCountMax 10000
Run Code Online (Sandbox Code Playgroud)
/etc/ssh/sshd_config
我的服务器(远程)端的配置文件。
/etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 10000
Run Code Online (Sandbox Code Playgroud)
经测试,ssh连接可以长时间保持活动状态。有一个参数/etc/ssh/ssh_config
,ConnectTimeout
,是什么意思?
做ConnectTimeout 0
或起ConnectTimeout 1000
不同的作用?