Using screen command to share session on Linux system
Posted On June 12, 2018
Lets take a look at how to share existing ssh session using command called screen. It is very useful in case where you have to show your users something remotely.
First install screen program – We assume CentOS7
yum install screen
System1
You can create multiple screen sessions or share existing on
Create multiple screen sessions
screen -d -m -S SESSION1 screen -d -m -S SESSION2
In order to just share existing session just run screen command
screen
System2
Install screen command
yum install screen
See running sessions
screen -ls
Connect to session if just screen command used
screen -x
Connect to specific session
screen -x SESSION1
note: In order to close the session login to this session and then use keys below
ctrl a then k