我正在使用Ubuntu22.04版本,并试图将ssh应用于VM服务器( Azure)。我通过端口22从另一台计算机成功地做到了这一点,现在我正在尝试使用ubuntu22.04计算机。我试过的是:
我运行了ssh -vvv usr@test111-huji.eastus.cloudapp.azure.com并获得了以下日志:
OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022
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 *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug2: resolving "test111-huji.eastus.cloudapp.azure.com" port 22
debug3: resolve_host: lookup test111-huji.eastus.cloudapp.azure.com:22
debug3: ssh_connect_direct: entering
debug1: Connecting to test111-huji.eastus.cloudapp.azure.com [20.106.142.77] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: connect to address 20.106.142.77 port 22: Connection timed out
ssh: connect to host test111-huji.eastus.cloudapp.azure.com port 22: Connection timed out发布于 2022-07-13 21:33:39
我也有同样的问题,我发现这是一个与我的路由器如何管理服务质量(QoS)有关的问题。要检查是否也是您的情况,首先尝试将选项-o IPQoS=none添加到SSH调用中:
ssh -o IPQoS=none -vvv usr@test111-huji.eastus.cloudapp.azure.com如果该选项有效,则可以将此选项添加到/etc/ssh/ssh_config中,使其成为默认选项:
IPQoS none不需要重新启动。
发布于 2022-06-21 08:21:02
Connecting to test111-huji.eastus.cloudapp.azure.com [20.106.142.77] port 22.这不是DNS问题,但它不会将主机转换为IP。
可能是fail2ban或其他防火墙或iptables规则不允许您试图访问的ip范围。
访问另一台PC,临时访问ufw或fail2ban服务,并从您的pc中检查是否可以连接。
https://askubuntu.com/questions/1415021
复制相似问题