掃二維碼與項目經(jīng)理溝通
我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流
screen命令不僅可以確保用戶在極端情況下也不丟失對系統(tǒng)的遠程控制,保證了生產(chǎn)環(huán)境中遠程工作的不間斷性,而且它還具有會話共享、分屏切割、會話鎖定等實用的功能。其中,會話共享功能是一件很酷的事情,當多個用戶同時控制主機的時候,它可以把屏幕內(nèi)容共享出來,也就是說每個用戶都可以看到相同的內(nèi)容。

創(chuàng)新互聯(lián)主營神池網(wǎng)站建設的網(wǎng)絡公司,主營網(wǎng)站建設方案,app軟件開發(fā)公司,神池h5小程序制作搭建,神池網(wǎng)站營銷推廣歡迎神池等地區(qū)企業(yè)咨詢
screen的會話共享功能的流程拓撲如圖9-13所示。
圖9-13 會話共享功能的流程拓撲
要實現(xiàn)會話共享功能,首先使用ssh服務程序?qū)⒔K端A遠程連接到服務器,并創(chuàng)建一個會話窗口。
[root@client A ~]# ssh 192.168.10.10
The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.
ECDSA key fingerprint is 70:3b:5d:37:96:7b:2e:a5:28:0d:7e:dc:47:6a:fe:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.
[email protected]'s password:此處輸入root管理員密碼
Last login: Wed May 4 07:56:29 2017
[root@client A ~]# screen -S linuxprobe
[root@client A ~]#然后,使用ssh服務程序?qū)⒔K端B遠程連接到服務器,并執(zhí)行獲取遠程會話的命令。接下來,兩臺主機就能看到相同的內(nèi)容了。
[root@client B ~]# ssh 192.168.10.10
The authenticity of host '192.168.10.10 (192.168.10.10)' can't be established.
ECDSA key fingerprint is 70:3b:5d:37:96:7b:2e:a5:28:0d:7e:dc:47:6a:fe:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.10.10' (ECDSA) to the list of known hosts.
[email protected]'s password:此處輸入root管理員密碼
Last login: Wed Feb 22 04:55:38 2017 from 192.168.10.10
[root@client B ~]# screen -x
[root@client B ~] 
我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流