Skip to content

Instantly share code, notes, and snippets.

@ftorto
Last active April 13, 2018 07:19
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 ftorto/8beab9bbffccf834475db694eeb43161 to your computer and use it in GitHub Desktop.
Save ftorto/8beab9bbffccf834475db694eeb43161 to your computer and use it in GitHub Desktop.
SSH Quickref

Environment

  • A initialize connection (ie. run ssh command) to B
  • A has a service SA exposed to port 11111
  • B has a service SB exposed to port 22222
  • Connection links between computers is D--A--B--C (each computer can only see immediate neighbors)

Scenarios

SB visible from A via A:10000

ssh -L 10000:127.0.0.1:22222 B

SB visible from D via D:10000

ssh -L D:10000:127.0.0.1:22222 B

SA visible from B via B:10000

ssh -R B:10000:A:11111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment