May 24, 2021 That's what Linux should learn
Screen command not only ensures that the user does not lose remote control of the system in extreme cases, and ensures the uninterrupted work remotely in the production environment, but also has practical functions such as session sharing, split-screen cutting, session locking, etc. Session sharing is a cool thing to do when multiple users control the host at the same time, it can share the screen content, that is, each user can see the same content.
The process topology of screen's session sharing capabilities is shown in Figures 9-13.
Figure 9-13 Process topology for session sharing capabilities
To implement session sharing, first use the ssh service provider to remotely connect Terminal A to the server and create a session window.
[root@client A ~]# ssh 192.168.10.10 The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established. E CDSA key fingerprint is 70:3b:5d:37:96:7b:2e:a5:28:0d:7e:dc:47:6a:fe:5c. A re you sure you want to continue connecting (yes/no)? y es Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts. r [email protected]'s password: Enter root administrator password Last login here: Wed May 4 07:56:29 2017 (root@client A- screen-S linuxprobe (root@client A-) and then use the ssh service program to remotely connect Terminal B to the server and execute the command to get the remote session. Next, the two hosts will see the same content.
[root@client B ~]# ssh 192.168.10.10 The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established. E CDSA key fingerprint is 70:3b:5d:37:96:7b:2e:a5:28:0d:7e:dc:47:6a:fe:5c. A re you sure you want to continue connecting (yes/no)? y es Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts. [email protected]'s password: Enter root administrator password last login here: Wed Feb 22 04:55:38 2017 from 192.168.10.10 (root@client B- screen -x (root@client B)