错误 4003:无法 ssh 登录我在谷歌云平台中创建的实例 [英] Error 4003: can't ssh login into the instance that I created in google cloud platform

查看:28
本文介绍了错误 4003:无法 ssh 登录我在谷歌云平台中创建的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 GCP 并创建了一个 vm 实例,但我无法通过 ssh 进入机器.这是我得到的错误:

I am using GCP and I created a vm instance, but I can't ssh into the machine. This is the error I am getting:

Connection via Cloud Identity-Aware Proxy Failed Code: 4003 Reason: failed to connect to backend

我搜索的原因是这可能意味着该实例没有侦听您尝试连接的端口或防火墙已关闭.

这是我的防火墙配置:

推荐答案

这可能不是一个完整的答案,但至少您的防火墙规则不允许 SSH 端口上的连接.应该有一个入口规则来允许流量通过该 VPC 网络上的 TCP 端口 22 (SSH) 传输到实例.

This may not be a complete answer, but at the very least your firewall rules aren't allowing connections on the SSH port. There should be an ingress rule to allow traffic to the instance on TCP port 22 (SSH) on that VPC network.

通常,这是由 GCP 自动创建的,在默认网络上通常称为default-allow-ssh",但您也可以在 VPC 网络 -> 防火墙规则选项卡中手动创建它.确保它适用于有问题的实例(通过所有目标"或与实例匹配的目标标签).您可以在文档中详细了解 GCP 防火墙规则.

Generally, this is automatically created by GCP, on the default network it is typically called "default-allow-ssh", but you can also manually create it in the VPC Network -> Firewall rules tab. Make sure it applies to the instance in question (either through "All targets" or a target tag that matches the instance). You can read more about GCP firewall rules in the documentation.

同样,请确保您有一个外部 IP 或者您正在遵循以下选项之一此处描述.

Likewise, make sure you have an external IP or that you are following one of the options described here.

这篇关于错误 4003:无法 ssh 登录我在谷歌云平台中创建的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆