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

