My script for pair sessions on my box.
- downloads the appropriate ssh keys from github
- punches a hole in my firewall (see Note #2)
- copies the appropriate 'ssh pair@your-external-ip' command to your clipboard (see Note #1)
- sets up the tmux session
- cleans up the session, the keys and the firewall after it's done
If you want your pair to auto-connect to your tmux session, then just copy the following to ~pair/.bash_profile
tmux -S /tmp/pairing attach -t pairing
exit
Then you type:
pair-session marksim
After that, just hit paste into your pair's chat window and voila, they ssh in and are automatically connected via tmux.
- If you are running linux, you can easily alias pbcopy and pbpaste like so: http://whereswalden.com/2009/10/23/pbcopy-and-pbpaste-for-linux/
- This is specific to my router, but you might be able replace the firewall calls to something that makes sense for you.