奇怪的ssh连接问题

我有一台tx云服务器:A-server(ubuntu),
一台家里的台式机:B-desktop(win,wsl),
一台校园网的台式机:C-inner(ubuntu)。

现在可以:

  • B-desktop 通过 ssh 连接 A-server
  • B-desktop 的 wsl2 可以通过 ssh 连接 A-server
  • C-inner 通过 ssh 连接 B-desktop
  • C-inner 通过 ssh 连接 B-desktop 的 wsl2
  • C-inner 可以 ping 通 A-server 的 ip
  • 使用笔记本在内网中直接 ssh 连接 C-inner
  • 将 C-inner 22 端口远程转发到 B-desktop 的 wsl 上,在 wsl 中使用 ssh 连接到 C-inner

但是:C-inner 不能通过 ssh 连接 A-server !?
连接过程就卡在连接上

$ ssh -v ubuntu@A-server -p1025
OpenSSH_8.9p1 Ubuntu-3ubuntu0.6, 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 *
debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 1025.
ssh: connect to host xx.xx.xx.xx port 1025: Connection timed out

这是为什么?求大佬指点 :pray: :pleading_face: 感谢

1025是敏感端口,可能是校园网拒绝所有1025的回包(当然也有可能是去包),尝试将A-server的ssh端口更换成其他端口试试看

2 个赞

还真是 :hushed:,第一次遇到这个问题,换到别的端口就可以了,谢谢 :open_hands: