Thursday, August 6, 2020

AWS - Bastion server

How can we access (ssh) protected ec2 instance? 

Protected EC2 instance means that EC2 instances are not connected to the open world. That EC2 belongs to protected subnets. These subnets don't have an internet gateway. When it links with Internet Gateway it becomes public subnets. These private subnets EC2 hosts our main web applications. SO how can we access to the protected subnets EC2 instances?

For that problem, we can initialize new ec2 instance inside the public subnets (open to the world). We can access these EC2 Instances using Putty or ssh tool with related .pem key-pair file (.pem file was created by EC2 instance initialize process). We can add a security group for that public subnets only given access for defined IPs (My IP) from this option that public subnets restrict with open access. Only You can access to the public instances.

In the public EC2 instance you can store the protected EC2 Instances .pem files. WithIn public Instance, you can ssh private instance with a defined IP range.





AWS - Bastion server

How can we access (ssh) protected ec2 instance?  Protected EC2 instance means that EC2 instances are not connected to the open world. That E...