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

GCP服务器SSH连接超时故障求助(已执行部分排查操作仍未解决)

GCP服务器SSH连接超时故障求助(已执行部分排查操作仍未解决)

各位大佬好,我现在碰到了GCP服务器SSH连接超时的问题,试了一些方法还是没搞定,想请教下大家该怎么处理。

我执行SSH命令后,得到了如下错误:

ssh: connect to host 35.230.96.246 port 22: Connection timed out

系统给出了排查建议:

Recommendation: To check for possible causes of SSH connectivity
issues and get recommendations, rerun the ssh command with the
--troubleshoot option.

gcloud compute ssh lab-1 --project=utopian-eye-406408 --zone=us-west1-b --troubleshoot

Or, to investigate an IAP tunneling issue:

gcloud compute ssh lab-1 --project=utopian-eye-406408 --zone=us-west1-b --troubleshoot --tunnel-through-iap

但我按照建议执行这些命令后,依然报错:

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

我自己也尝试了两种操作,不过问题还是没解决:

  • 创建允许SSH的防火墙规则:
    gcloud compute firewall-rules create allow-ssh
    
  • 再次执行带IAP隧道和排查参数的SSH命令:
    gcloud compute ssh lab-1 --project=utopian-eye-406408 --zone=us-west1-b --troubleshoot --tunnel-through-iap
    

有没有大佬能帮忙分析下问题出在哪,或者给点下一步的排查建议?

备注:内容来源于stack exchange,提问作者Prosper Ekakati

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.21 07:18:07