小编Mal*_*lte的帖子

通过 ipv6 连接时 SSH 超时,但可用于 ipv4

昨天我重新安装了 Ubuntu(出于不相关的原因),从那时起 ssh 的行为就非常奇怪。
连接需要很长时间(几分钟)。使用 -vvv 我发现它首先尝试使用 ipv6 连接(超时),然后尝试通过 ipv4 连接,这几乎立即生效。
我以前从来没有遇到过 ssh 问题。

跑步

ssh login@address.net -vvv
Run Code Online (Sandbox Code Playgroud)

(带有我想要连接的地址)返回

OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolving "address.net" port 22
debug2: ssh_connect_direct
debug1: Connecting to address.net [*:*:*:*::*] port 22.
debug1: connect to address *:*:*:*::* port 22: Connection timed out
debug1: Connecting to address.net [*.*.*.*] port 22.
debug1: …
Run Code Online (Sandbox Code Playgroud)

linux ssh ubuntu ipv4 ipv6

3
推荐指数
1
解决办法
2584
查看次数

标签 统计

ipv4 ×1

ipv6 ×1

linux ×1

ssh ×1

ubuntu ×1