skip to Main Content

I create a VPC, and try to connect to a EC2 by connecting to AWS Ubuntu.

But when I go to the page of connecting, it showed me this

The instance does not have a public IPv4 address
To connect using the EC2 Instance Connect browser-based client, the instance must have a public IPv4 address.

What I’ve tried

In EC2 Panel > Action > Networks > Manage IP Address > Ipv4 Addresses > Assign New IP Address(only available for priate IP Address, but I couldn’t do anything in section of pubilc IP Address)

3

Answers


  1. Go to the EC2 dashboard, on the left panel, open Network & Security -> Elastic IPs

    Allocate an elastic IP, and click Actions dropdown. Click Associate Elastic IP address.

    You can connect the elastic IP to your instance or Network interfaces of the instance.

    Login or Signup to reply.
  2. First, do you mean Private Subnet?
    Also ensure port 22 is open from correct ip. Private EC2 can’t be accessed from public internet.
    To connect with EC2 in private subnet you need a bastion host & NAT gateway attached.
    Refer this link for more info.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search