Skip to content

Instantly share code, notes, and snippets.

@mredar
Created May 8, 2015 17:36
Show Gist options
  • Save mredar/f240b1a6fe8d21add9be to your computer and use it in GitHub Desktop.
Save mredar/f240b1a6fe8d21add9be to your computer and use it in GitHub Desktop.
Setup the tunnel:
ssh -i <identity file for bastion> -L <localport>:<endpoint ip or name>:<endpoint ssh port or other port> <bastion user>@<ssh bastion server>
Then from local machine connect to local port which will be forwarded to endpoint
ssh -i <identity file for endpoint> <endpoint user>@localhost -p <localport from above>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment