Skip to content

Instantly share code, notes, and snippets.

@nicdoye
Created March 4, 2017 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicdoye/0043647355c313bd689fb697b5231ad3 to your computer and use it in GitHub Desktop.
Save nicdoye/0043647355c313bd689fb697b5231ad3 to your computer and use it in GitHub Desktop.
A sample ssh config for bastions/gateways
# Your bastion host
Host bastion bastion.example.com
IdentityFile ~/.ssh/bastion-example-com.pem
Port 12345
User bastion-user
# Inside the VPC
Host host0.internal host1.internal
User another-user
ProxyCommand ssh bastion.example.com -i ~/.ssh/host-internal.pem -W %h:%p
Host something-else0.internal
User yet-another-user
ProxyCommand ssh bastion.example.com -i ~/.ssh/something-else-internal.pem -W %h:%p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment