ssh_config 中的 ConnectTimeout 是什么意思?

sho*_*key 6 ssh connection

本地和远程操作系统都是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_configConnectTimeout,是什么意思?
ConnectTimeout 0或起ConnectTimeout 1000不同的作用?

use*_*517 10

人 ssh_config

/连接超时

ConnectTimeout 指定连接到 SSH 服务器时使用的超时(以秒为单位),而不是使用默认的系统 TCP 超时。此超时适用于建立连接和执行初始 SSH 协议握手和密钥交换。

  • 作为此选项的原始作者,请注意:手册页最初是正确的,但 ConnectTimeout 后来用于其他目的。目前,超时也适用于初始 SSH 握手。我会为此提出一个补丁。 (8认同)
  • 建议的联机帮助页补丁:https://bugzilla.mindrot.org/show_bug.cgi?id=3035 (4认同)
  • 手册页补丁已于 2019 年 9 月 13 日提交 https://github.com/openssh/openssh-portable/commit/2ce1d11600e13bee0667d6b717ffcc18a057b821 (2认同)
  • 我提交了对答案的编辑,其中包含更新的 ConnectTimeout 描述。 (2认同)