Skip to content

Instantly share code, notes, and snippets.

@doitian
Created February 6, 2013 10:00
Show Gist options
  • Save doitian/4721556 to your computer and use it in GitHub Desktop.
Save doitian/4721556 to your computer and use it in GitHub Desktop.
A -> B -> C SSH tunnel
# forward C SSH port 22 to the port 2222 on A through B, run it on A
ssh -R 2222:HostC:22 HostB
# run on A. Since A:2222 is forwarded to C, just SSH to it
ssh -p 2222 localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment