Skip to content

Instantly share code, notes, and snippets.

@linse
Last active April 5, 2022 12:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linse/516cecbcc03974e0e452d1afc0a8f392 to your computer and use it in GitHub Desktop.
Save linse/516cecbcc03974e0e452d1afc0a8f392 to your computer and use it in GitHub Desktop.

https://coderwall.com/p/4j4azg/pair-program-anywhere-with-tmux-over-ssh-tunnel

https://github.com/roburio/pf-firewall/blob/master/TODO

ssh -R 2222:localhost:22 linse@linse.me

The local user would open a tmux session specifying a shared socket:

tmux -S /tmp/pair new-session -s pairing; chmod 0777 /tmp/pair

Other guest user goes back into the tunnel like so:

ssh -p 2222 -l linse localhost

The guest user connected as pair would attach using the shared socket:

tmux -S /tmp/pair attach-session -t pairing

@yomimono
Copy link

once on the remote server, the user who's coming into the tunnel needs to do ssh -p 2222 -l pair localhost

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