qoomon / aws-ssm-ec2-proxy-command

AWS SSM EC2 SSH Proxy Command
MIT License
213 stars 73 forks source link
aws aws-cli aws-ssm ec2 security ssh ssh-proxy-command

aws-ssm-ec2-proxy-command Sparkline

Open an SSH connection to your ec2 instances via AWS SSM without the need to open any ssh port in you security groups.

ⓘ Prefer ec2-instance-connect implementation if possible
ⓘ Windows users please refere to README.windows.md

Prerequisits

Install SSH Proxy Command

Setup SSH Config [optional]

Open SSH Connection

Recommended Usage of ec2-instance-connect:SendSSHPublicKey

The advantage from a security perspective is that you don't need to grant ssm:SendCommand to users and there by the permission to execute everything as root. Instead you only grant ec2-instance-connect:SendSSHPublicKey permission to a specific instance user e.g. ec2-user.