aws ssm start-session
CautionSession Manager shell
aws ssm start-session --target <instance-id>
Shell into EC2 with no open SSH port, no keys, no bastion — and sessions are logged.
Examples
aws ssm start-session --target i-0abc123Open a session
Syntax
aws ssm start-session --target i-xxxx
Before you run it
Commands hit the instance directly.
Used when you see
Can't SSH into EC2
4
See the whole flow →Use SSM Session Manager as the fallback doorWith the agent and role, you don't need SSH at all.
Related commands
- aws ec2 describe-instancesList EC2
- sshRemote shell
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store