Created
March 6, 2022 22:42
-
-
Save terrywang/0aa83822c501a541071c6bf39f08db40 to your computer and use it in GitHub Desktop.
Using AWS SSM for SSH Dynamic Forwarding so as to access services in private subnet
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
Host ssm-tatooine | |
ProxyCommand sh -c "aws ssm start-session --target <instance id> --region <region> --document-name AWS-StartPortForwardingSession --parameters '{\"portNumber\":[\"22\"],\"localPortNumber\":[\"22222\"]}'" | |
Host dynamic-forwarding | |
Hostname localhost | |
user terry | |
IdentityFile ~/.ssh/r2d2_ed25519 | |
Port 22222 | |
UserKnownHostsFile /dev/null | |
DynamicForward 1080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment