错误4003:无法ssh登录到我在Google Cloud Platform中创建的实例 [英] Error 4003: can't ssh login into the instance that i created in google cloud platform

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

问题描述

我正在使用GCP,并且创建了一个vm实例,但是无法SSH到计算机中.这是我得到的错误:

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

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

我搜索时是因为This might mean the instance isn't listening on the port you're trying to connect to or the firewall is closed.

这是我的防火墙配置:

推荐答案

这可能不是一个完整的答案,但是至少您的防火墙规则不允许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登录到我在Google Cloud Platform中创建的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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