Connecting an AWS EC2 Instance of a Private Subnet using Bastion Host (original) (raw)

Last Updated : 28 May, 2026

Connecting to an instance inside a private subnet is an important part of secure AWS networking. This is commonly done using a Bastion Host placed inside a public subnet, which acts as a secure entry point to private instances.

Before moving to the implementation section, let us first understand some important AWS networking terms.

Key Terminologies

After understanding these key concepts, we can now move towards the implementation part of connecting a private instance using a Bastion Host.

Implementation

**Step 1: Create a VPC

Screenshot-2026-05-20-143248

**Step 2: Create Public Subnet

Screenshot-2026-05-20-143428

**Step 3: Create Private Subnet

Screenshot-2026-05-20-143535

**Step 4: Create Internet Gateway

Screenshot-2026-05-20-143918

**Step 5: Attach Internet Gateway to Virtual Private Cloud

**Step 6: Create Public Route Table

Screenshot-2026-05-20-144103

**Step 7: Add Internet Route

Screenshot-2026-05-20-144207

**Step 8: Associate Public Subnet

Screenshot-2026-05-20-144511

**Step 9: Create Private Route Table

Screenshot-2026-05-20-144618

**Step 10: Associate Private Subnet

Screenshot-2026-05-20-144659

**Step 11: Launch Bastion HOST EC2

Screenshot-2026-05-20-150023

**Step 12: Launch Private EC2

**Step 13: Connect to Bastion-Host

Screenshot-2026-05-20-152406

**Step 14: Copy key to Bastion host

Screenshot-2026-05-20-152659

**Step 15: SSH Into Private EC2

Screenshot-2026-05-20-153335