Skip to content

Instantly share code, notes, and snippets.

@korniichuk
Created January 3, 2020 19:33
Show Gist options
  • Save korniichuk/1f1d4cca3a0783924deefcd5994a2ad5 to your computer and use it in GitHub Desktop.
Save korniichuk/1f1d4cca3a0783924deefcd5994a2ad5 to your computer and use it in GitHub Desktop.
How to securely connect EC2 via SSH with AWS Systems Manager Session Manager
# SSH over AWS Systems Manager Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment