Why use AWS SSM Session Manager instead of SSH?
IntermediateProductionSSH & Access Hardening
Answer
The SSM agent makes an outbound connection to AWS, so no inbound port 22, no bastion and no SSH keys are needed. Access is controlled with IAM, every session can be logged to CloudWatch or S3, and you can still tunnel ports or run ssh over it (ProxyCommand aws ssm start-session ...). It needs the agent installed, an instance profile with AmazonSSMManagedInstanceCore, and network reach to the SSM endpoints (VPC endpoints in private subnets).
More on SSH & Access Hardening
What are the first sshd_config changes you make on a new production server?BeginnerWhy use a drop-in file in /etc/ssh/sshd_config.d/ instead of editing sshd_config?IntermediateWhy disable SSH password authentication entirely?BeginnerShould you change the SSH port from 22?IntermediateWhat are SSH certificates and why do large fleets use them?AdvancedHow do you restrict what a specific SSH key can do?Advanced