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 space.muppets.com
RemoteForward 1235 localhost:22
User animal
- Fozzie will have the following in
~/.ssh/config
Host tunnel_to_animals_via_muppets
Hostname space.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
What an amazing gist.