Skip to content

Instantly share code, notes, and snippets.

@merevu
Last active June 5, 2023 09:18
Show Gist options
  • Save merevu/b4a669653f85937560be to your computer and use it in GitHub Desktop.
Save merevu/b4a669653f85937560be to your computer and use it in GitHub Desktop.
ssh-tunneling
# local tunnel (for connecting remote from local)
ssh -f -N -L{LOCAL-PORT}:{DEST-IP}:{DEST-PORT} -l {JUMP-HOST-USER} {JUMP-HOST-IP}:{JUMP-HOST-PORT}
# reverse tunnel (for connecting local from remote)
ssh -f -N -R {LOCAL-PORT}:{DEST-IP}:{DEST-PORT} -l {LOCAL_USER} {LOCAL-IP}:{LOCAL-PORT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment