Services

Resources

Company

AWS SSM Session Manager

AWS SSM Session Manager is a feature of AWS Systems Manager (SSM). It gives engineers interactive shell access and port forwarding to EC2 instances, on-premises servers and virtual machines. It needs no SSH keys, no bastion host and no inbound security group rules. Access is controlled by IAM (identity and access management) policies and can be logged.

How it works

The SSM Agent on the instance makes an outbound connection to the Systems Manager service, either over the internet or through VPC (virtual private cloud) interface endpoints in a private subnet. A user with the ssm:StartSession permission runs aws ssm start-session --target i-0abc123 to get a shell. The AWS-StartPortForwardingSession document forwards a remote port, such as a database on 5432, to localhost. Idle sessions end after 20 minutes by default.

Why it matters in production

Removing port 22 and long-lived SSH keys closes a common attack path. Access becomes tied to individual IAM identities, which makes revoking it and auditing it simpler than tracking shared keys. Session logs can go to CloudWatch Logs or S3 for compliance reviews.

See also

On the One2N blog

References

  1. Origin of the term

  2. AWS Systems Manager Session Manager (AWS documentation)

Comic about AWS SSM Session Manager: the old way to log in uses a key file and an open port anyone can knock on, and keys get lost; the new way has the server dial out to AWS so nothing calls in; one command, aws ssm start-session, checks your normal AWS login and opens a terminal; each session is tied to a person and can be logged, with no keys to leak and no open port.