How to SSH EC2 instance with ssh-agent along with SSH agent forwarding to SSH private instances in VPC?
Image Source: atulhost.com and modified by me Hi, I have taken this post from AWS Blog, and this very important to SSH into your VM using ssh-agent and SSH forwarding for EC2 private instance to SSH without storing the private key securely in Windows, Mac, and Linux. So, I want you to using this as this is very important as per security reasons. Configuring ssh-agent The first step in using SSH agent forwarding with EC2 instances is to configure a bastion in your VPC. We suggest that the instance you use for your bastion be purpose-built and that you use it only as a bastion and not for anything else. The bastion should also be set up with a security group that’s configured to listen only on the SSH port (TCP/22). Always remember the following when configuring your bastion: Never place your SSH private keys on the bastion instance. Instead, use SSH agent forwarding to connect first to the bastion and from there to other instances in private subnets. This lets you k