You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Compute Engine SSH连接超时(错误码255)求助

SSH连接Google Compute Engine实例超时,telnet测试端口22也失败

我最近尝试通过SSH连接我的Google Compute Engine实例,执行了以下命令:

gcloud compute ssh username@instance --ssh-flag="-v" --zone=us-east1-b

结果返回了超时错误,完整的调试日志如下:

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /home/username/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ip-address [ip-address] port 22.
debug1: connect to address ip-address port 22: Connection timed out
ssh: connect to host ip-address port 22: Connection timed out
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]

(注:上述日志中的ip-address均为实例的实际公网IP地址)

我怀疑是实例所在的网络拦截了当前连接,于是又用telnet测试端口22:

telnet instance-ip-address 22

得到的结果同样是超时:

Trying instance-ip-address..
telnet: Unable to connect to remote host: Connection timed out

有没有大佬能帮忙分析下这个问题的原因,以及给出解决办法呀?

内容的提问来源于stack exchange,提问作者sandeep cb

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:19:51