Start with a machine that is directly accessible to both parties via SSH (linode, EC2, prgmr.com, etc), and that you can add users to. DO NOT USE root!!!!
##From the hosts local machine:
ssh -R1337:localhost:22 host@<shared server's ip address/hostname>
tmux -S /tmp/pair
Then from inside your new tmux session execute:
chmod 777 /tmp/pair
ssh pair@<shared server's ip address/hostname>
##Shared Host Setup - Once
sudo adduser host
sudo su - host
mkdir ~/.ssh
chmod 700 ~/.ssh
sudo adduser pair
sudo su - pair
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa -C "pair@ircely"
Add the following to the users authorized_keys file:
command="ssh pair@localhost -p 1337",no-port-forwarding,no-X11-forwarding,no-agent-forwarding <pair users public key (can use github API like: https://api.github.com/users/rjackson/keys)>
Add the host users public key to the /home/host/.ssh/authorized_keys file
Add a user for the pair to your local system:
On ubuntu/debian:
sudo adduser pair
(Use system preferences for Mac OSX)
# execute the following once the user is created
sudo su - pair
mkdir ~/.ssh
chmod 700 ~/.ssh
Add the following line to the pair users ~/.ssh/authorized_keys (note that the /usr/local/bin/tmux bit will be different based on the location of tmux executable):
command="/usr/local/bin/tmux -S /tmp/pair attach",no-port-forwarding,no-X11-forwarding,no-agent-forwarding <pair-users-ssh-public-key (from shared internet host /home/pair/.ssh/id_rsa.pub)>