Last active
April 27, 2023 02:05
-
-
Save rdkls/89b1488789c834ded480b46e0ca90d3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# brew install session-manager-plugin | |
# Bootstrap your ssh key to ec2 instance, then start ssh session over ssm to it | |
# Since it's plain ssh can then e.g. port forward and all the funky stuff | |
Host i-* mi-* ssm-jumphost | |
User ec2-user | |
IdentityFile ~/.ssh/nick-doyle-slalom-lab-ed25519 | |
ProxyCommand sh -c "aws ec2-instance-connect send-ssh-public-key --instance-id %h --ssh-public-key '$(cat ~/.ssh/nick-doyle-slalom-lab-ed25519.pub)' --instance-os-user ec2-user; 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