-
SSH into the box
user1@user1-machine$ ssh user@host
-
Start a tmux session with a name
user@remote-machine$ tmux new -s <session_name>
-
SSH into the box
user2@user2-machine$ ssh user@host
-
Join the session created by User 1
user@remote-machine$ tmux a -t <session_name>
-
SSH into box
user1@user1-machine$ ssh user1@host
-
Create a tmux session as a file and set its permissions
user1@remote-machine$ tmux -S /tmp/pair -d -s pair user1@remote-machine$ chmod 777 /tmp/pair
-
Join session
user1@remote-machine$ tmux -S /tmp/pair attach
-
SSH into box
user2@user2-machine$ ssh user2@host
-
Join session created by User 1
user2@remote-machine$ tmux -S /tmp/pair attach
Credits to Flaviu Simihaian and Chris Hunt from where these are taken.
Take a look at https://tmate.io/ and wemux