This doc outlines how to setup a remote pairing session using SSH and GNU Screen. These instructions were adapted from https://www.agileventures.org/remote-pair-programming/gnu-screen-pairing-notes
Prerequisit: The person on the guest machine needs a user account created on the host that they can connect to via SSH.
- Install Screen
- Mac: Should already be installed, but you can also find it on homebrew
- Ubuntu:
sudo apt-get install screen
- (Platform dependent) Add the set-uid bit to screen chmod 4755 /usr/bin/screen
- Create a terminal window. Adjust the window to a reasonable size, as this will be the layout that all the guests will see.
- Start or resume a screen session (the -L logs the session)
screen -R -D -L
- Set up multiuser and add permission for the guest user with the next two key sequences. Don't forget the colon after control-A.
<ctrl-a>:multiuser on<return>
<ctrl-a>:acladd <guest_username><return>
- SSH into the guest account on the host machine.
- If you want to be able to hit a webserver running on the host, include
-L 8001:localhost:8000
. This allows port 8001 locally to hit port 8000 on the host machine. - You may also want
-X
for X11 forwarding
- If you want to be able to hit a webserver running on the host, include
- Join the host's screen session by including the host's username in the following command. The slash at the end is important:
screen -x <host_username>/
- With a bit of luck, you should be sharing control of a terminal from which you can run console programs and full screen editors like nano, vim, and emacs.