Connection to amazon-ec2 VPC instance fails

寵の児 提交于 2019-12-25 02:33:07

问题


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).

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@".

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?

Thanks, Laurent


回答1:


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.

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

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

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



来源:https://stackoverflow.com/questions/22627962/connection-to-amazon-ec2-vpc-instance-fails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!