Quick Script for TMUX pair sessions
Update 2013-06-14: Improved the script, removing the github-auth dependency, some of the OS X dependencies, and added firewall punch-through (user specific) and ssh-command with external IP auto-copy to clipboard I wanted a quick and easy way to set up a new TMUX session with a brand new pair, so I came up with this: #!/bin/sh gh-auth add $1 sudo cp ~/.ssh/authorized_keys /Users/pair/.ssh/authorized_keys sudo chown pair:staff /Users/pair/.ssh/authorized_keys gh-auth remove $1 tmux -S /tmp/pairing new -ds pairing && chgrp staff /tmp/pairing && tmux -S /tmp/pairing attach -t pairing sudo rm -f /Users/pair/.ssh/authorized_keys That will download ssh keys, create a tmux session, and attach to it. When you’re done it will cleanup so the other person has no access to your box. ...