Skip to content

Instantly share code, notes, and snippets.

@wm
Last active April 1, 2021 23:37
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save wm/2352428 to your computer and use it in GitHub Desktop.
Save wm/2352428 to your computer and use it in GitHub Desktop.
TMUX Pairing

SSH setup for remote pairing

If Animal and Fozzie wanted to pair on Animals machine and they both have access to shared.muppets.com then they could use the following setup

  • Animal will have the following in ~/.ssh/config
Host tunnel_from_muppets
  Hostname shared.muppets.com
  RemoteForward 1235 localhost:22
  User animal
  • Fozzie will have the following in ~/.ssh/config
Host tunnel_to_animals_via_muppets
  Hostname shared.muppets.com
  LocalForward 9999 localhost:1235
  User fozzie
   
Host animals_via_muppets
  Hostname localhost
  User fozzie
  Port 9999
  • Animal creates an ssh tunnel to his machine via shared.muppets.com
ssh tunnel_from_muppets
  • Fozzie creates a tunnel to Animals tunnel on shared.muppets.com
ssh tunnel_to_animals_via_muppets
  • Fozzie in another shell can then ssh to Animal's machin as follows
ssh animals_via_muppets
@chip
Copy link

chip commented Jun 16, 2012

Just to be clear, shouldn't space.muppets.com really be shared.muppets.com?

@wm
Copy link
Author

wm commented Dec 18, 2013

Yes - modified

@wm
Copy link
Author

wm commented Dec 18, 2013

Also anyone that lands here should just checkout tmate.io it is really great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment