aws check ssh on 1000 ec2 code example
Example: best way to ssh to ec2 instance through public cloud
# SSH over Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"