apt-get install openssh-server screen [vim, emacs, nano] # install required tools, choose your text editor of choice.
chmod u+s `which screen` # add suid root bit to screen to allow multi user mode
# Ensure there are users added in the system.
adduser [username]
usermod -a -G [secondary group name] [username] # optional, add user to additional groups
# start screen
screen -aAUS [screen name]
# inside screen (as user 1)
ctrl-a : multiuser on # turn on multiuser mode
ctrl-a : addacl user2[,user3, ...] # authorize user2, user3,... to access this screen.
apt-get install openssh-client [openssh-server] [vim, emacs, nano] # install required tools, choose your text editor of choice.
ssh user2@server
screen -r user1/[screen name]
Collaborate as needed. There can be more than 1 screen at a time to edit the source code on one and run tests on another.
See http://www.gnu.org/software/screen/manual/screen.html for screen user manual.
See http://askubuntu.com/questions/117487/using-ubuntus-screen-command-to-share-screens for multi user issues you may have.