Linux – Allow access to Linux Console

consolelinuxsharesshterminal

Suppose one is running an SSH session into a GNU/Linux box of a client and he asks you to see "what you are doing". How can you allow this other party to see what's going on in your session?

Best Answer

You could try using the "screen" command. This will allow you to run a multiuser session which 2 users can connect and share. First you'll need to set the suid bit. screen comes with it turned off, and it is necessary for multiuser mode:

sudo chmod +s /usr/bin/screen
sudo chmod 755 /var/run/screen

The first user connect, running

screen -S shared

The "-S" just gives the session an easy to use name. To allow multiuser access, use "CTRL+A" to run screen commands:

CTRL+A
:multiuser on
:acladd otheruser

When otheruser connects over ssh, he just needs to run

screen -x firstuser/shared

to join the session