身份验证后 SSH 连接速度变慢

身份验证后 SSH 连接速度变慢

我有几个服务器,通过 SSH 连接它们可能需要一分钟左右的时间才能收到提示。我连接了,ssh -vvv但它挂了身份验证成功,因此它不是通常的内容(UseDNS no,禁用 GSSAPI 等)。

在日志中,经过身份验证后,我看到以下内容:

debug1: Authentication succeeded (publickey).
Authenticated to xxxx.example.com ([2a01:.......]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug3: This windows OS supports conpty
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug3: Successfully set console output code page from:65001 to 65001
debug3: Successfully set console input code page from:437 to 65001

然后它会挂起一段时间,然后像正常一样继续:

debug3: send packet: type 80
debug3: send packet: type 80
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 4
debug1: Remote: /home/daniel/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /home/daniel/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
... cut for brevity ...

并随后立即连接。

实际会话很好并且没有任何缓慢的现象,但我无法弄清楚最初连接时挂起期间发生了什么。

有任何想法吗?

相关内容