ssh 说网络无法访问,尽管网络可以访问

ssh 说网络无法访问,尽管网络可以访问

我使用的是ubuntu 20.04。 ssh 一直工作,直到我重新启动计算机。从那时起我就无法再使用 ssh 连接了。

“ssh example.com”令人惊讶地有效。但“ssh 8.8.8.8”或“ssh google.com”输出“网络无法访问”,telnet google.com 22 给出“网络无法访问”,尽管我可以在浏览器上导航。

/etc/ssh/ssh_config 包含“端口 22”

我已经尝试了在互联网上可以找到的所有方法。我的猜测是 ssh 请求在到达网络之前被阻止,但我不知道如何解决这个问题。

谢谢

编辑:ssh[电子邮件受保护]-vvv 会要求输入密码,但现在显示:

OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/antoine/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 19: Including file /etc/ssh/ssh_config.d/ssh_ant.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/ssh_ant.conf
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 18.198.187.192 is address
debug2: ssh_connect_direct
debug1: Connecting to 18.198.187.192 [18.198.187.192] port 22.
debug1: connect to address 18.198.187.192 port 22: Connection timed out
ssh: connect to host 18.198.187.192 port 22: Connection timed out

答案1

@EduardoTrápani 发现这可能是网络问题而不是 ssh 问题,因为“ping”也无法访问请求的 IP 地址

相关内容