连接到亚马逊EC2 VPC实例失败 [英] Connection to amazon-ec2 VPC instance fails

查看:794
本文介绍了连接到亚马逊EC2 VPC实例失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下设置: - 一个VPC,具有多个子网,和接入网关以及具有我可以连接到公共地址的NAT的情况下, - 创建一个子网的VPC的,不具有公网IP地址或DNS名称(我想,只有负载均衡器可在互联网上已知的)

I have the following setup: - a VPC, with several subnets, and an access gateway and a NAT instance having public addresses that I can connect to, - I create a Linux instance in a subnet of the VPC, that has NO public IP address or DNS name (I want that only the Load Balancer be known on the internet).

我想连接到我的Linux实例安装和配置软件。 如何连接到该实例?所有我见过的文件中提到,您连接使用EC2用户@。

I want to connect to my Linux instance to install and configure software. How do you connect to that instance? All the documentation I have seen mentions that you connect using "ec2-user@".

由于我没有公共DNS,我试图从接入网关通过腻子与我的Linux实例的专用DNS连接,但它失败(主机不存在)。 我显然失去了一些东西......在NAT?

Since I have no public DNS, i have tried to connect from the access gateway via putty with the private DNS of my linux instance but it fails ("host does not exist"). I am obviously missing something ... in the NAT?

谢谢,洛朗

推荐答案

您需要在您可以访问公共子网中的主机。一旦你访问该主机,那么您可以使用自己的私有IP地址连接到VPC的其他主机。

You need to have a hosts in the public subnet which you can access. Once you access this host, then you can connect to your other hosts in VPC using their private IP address.

您有问题实例有所以从您的工作站连接它只是私有IP地址是行不通的。

Your instance in question has only private IP address so connecting it from your workstation is not going to work.

我指的是主机通常被称为的堡垒主机。阅读提示方案2:VPC与新闻及私人子网的文档。

The host I am referring to is usually called Bastion Host. read the Tip in Scenario 2: VPC with Public and Private Subnets documentation.

此外,阅读这个前几个结果<一个href="https://www.google.com/search?q=VPC%20bastion%20host&ie=utf-8&oe=utf-8&aq=t#q=AWS%20VPC%20bastion%20host"相对=nofollow>谷歌搜索获取对使用情况全面了解的堡垒主机。

Also, read first few results of this Google Search to gain overall understanding on use-cases for Bastion hosts.

这篇关于连接到亚马逊EC2 VPC实例失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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