June 6, 2020 / Nirav S
Managing EC2 without logging in:- Bastion free & SSH Key free access to EC2 Instances
AWS Systems Manager Run Command you remotely and securely manage the configuration of your managed instances. A managed instance is an EC2 instance or on-premises machine. You can use Run Command from the AWS console, the AWS Command Line Interface, AWS Tools for Windows PowerShell, or the AWS SDKs.
Run Command is offered at no additional cost.
Session Manager is part of AWS Systems Manager service. It gives you a browser-based CLI window to access your Windows and Linux EC2 instances without opening an inbound SSH/RDP port. No need to create a bastion host. No need to manage SSH keys. Access can be granted or revoked using AWS IAM.
AWS Systems Manager uses SSM agents running on the EC2 instance to manage the login and other tasks.
Now let’s see how to implement on AWS console.
# mkdir /tmp/ssm
# cd /tmp/ssm
# yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
# systemctl enable amazon-ssm-agent
# systemctl start amazon-ssm-agent
# systemctl status amazon-ssm-agent
# yum update -y
In this blog, we understood how to login to a bastion host with AWS SSM – run command, and with help of this you can log in to the server without SSH/RDP in a secure manner in any environment whether it Linux or windows.
Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.