Skip to content

Instantly share code, notes, and snippets.

@Locoxella
Created February 7, 2018 19:05
Show Gist options
  • Save Locoxella/581eae375ae421ecadf7531dc8c8e49a to your computer and use it in GitHub Desktop.
Save Locoxella/581eae375ae421ecadf7531dc8c8e49a to your computer and use it in GitHub Desktop.
ssh tunnel through bastion

Although you can edit ~/.ssh/config file to proxy connections through a Bastion, the only line you need to do ssh tunnel through a bastion (with a .pem file) is:

ssh -i ~/.ssh/file.pem -N -L 8080:internal.host:80 [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment