
One other benefit is that you don’t need to have MFA enabled on each instance. Once you have done that, you can focus on tightening the security on your bastion host and only putting your controls there. This can be done by creating an inbound rule of type SSH in the security group of those instances, with the source being either the IP or the security group of the bastion host. We recommend limiting the access to your instances to a bastion host, so that people can’t violate the security policy by logging directly into the instances. One approach that we recommend is to have a bastion host or a jump box in front of your instances and access your instances through your bastion host. Most commonly, we see people SSH into their instances directly using their public IP addresses, which makes putting security controls in place for instances complicated and repetitive. With MFA enabled, the user login is dependent on what they know (i.e., the password) and what they have (the one-time password generated by an OATH-TOTP app or a physical token). We can take the same idea and enable MFA on an EC2 instance.

One of the best-recommended practices, when it comes to AWS console access, is to have multi-factor authentication (MFA) enabled for the root account and all user accounts. In order to make access to the instances more secure to help prevent a breach, you should put additional controls.
Aws load balanced ssh bastion servers full#
Then, any user who has this key pair and the username now has full access to your instances.

The risk here is if your local machine is compromised. That key pair is downloaded and stays on your local machine. When you create an EC2 instance you are prompted to create or select a previously-created key pair for the instance so that you can SSH into the box. In this blog post, I am going to walk through implementing an additional layer of authentication security for your EC2 instances by requiring two-factor authentication for administrators to use SSH to connect. At AWS, security is our top priority so we recommend that customers implement security controls in every layer of their applications.
