Kali 安裝tightvncserver


一、軟件說明

  a) tightvncserver是一個輕量級,只能建立桌面,不能查看TTY7/TTY1正在顯示的桌面,但x11 vnc可以,相比x11vnc 安全傳輸差一些。反之,x11 vnc:安全傳輸較好,但占用資源比tightvncserver要多。

  b) XRDP是一個服務器的遠程桌面協議(RDP),Xrdp是免費軟件。基於rdesktop工作,旨在為Linux提供功能的終端服務器。

二、安裝tightvncserver

執行命令:apt-get install tightvncserver(我這里已經存在)

root@kali:~# apt-get install tightvncserver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
tightvncserver is already the newest version (1:1.3.9-9).
0 upgraded, 0 newly installed, 0 to remove and 199 not upgraded.
root@kali:~# 

三、安裝Xrdp

執行命令:apt-get install xrdp

root@kali:~# apt-get install xrdp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  xorgxrdp
Suggested packages:
  guacamole xrdp-pulseaudio-installer
The following NEW packages will be installed:
  xorgxrdp xrdp
0 upgraded, 2 newly installed, 0 to remove and 199 not upgraded.
Need to get 588 kB of archives.
After this operation, 3821 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ustc.edu.cn/kali kali-rolling/main arm64 xorgxrdp arm64 1:0.2.9-1 [170 kB]
Get:2 http://mirrors.ustc.edu.cn/kali kali-rolling/main arm64 xrdp arm64 0.9.9-1 [417 kB]
Fetched 588 kB in 5s (128 kB/s)
Selecting previously unselected package xorgxrdp.
(Reading database ... 253097 files and directories currently installed.)
Preparing to unpack .../xorgxrdp_1%3a0.2.9-1_arm64.deb ...
Unpacking xorgxrdp (1:0.2.9-1) ...
Selecting previously unselected package xrdp.
Preparing to unpack .../xrdp_0.9.9-1_arm64.deb ...
Unpacking xrdp (0.9.9-1) ...
Setting up xrdp (0.9.9-1) ...

Generating 2048 bit rsa key...

ssl_gen_key_xrdp1 ok

saving to /etc/xrdp/rsakeys.ini

update-rc.d: We have no instructions for the xrdp init script.
update-rc.d: It looks like a network service, we disable it.
xrdp-sesman.service is a disabled or a static unit, not starting it.
Setting up xorgxrdp (1:0.2.9-1) ...
Processing triggers for systemd (241-7) ...
Processing triggers for man-db (2.8.6.1-1) ...
Processing triggers for libc-bin (2.28-10) ...
root@kali:~# 

四、kali系統文件配置

  a) 向xsession中寫入xfce4-session

 echo “xfce4-session” >~/.xsession 

  b) 修改/etc/xrdp/startwm.sh文件

在/etc/X11/Xsession前加入xfce4-session

  c) 重啟xrdp

 /etc/init.d/xrdp restart 

五、使用VNC

  a) 啟動ssh服務

 /etc/init.d/ssh start 

  b)啟動xrdp服務

 /etc/init.d/xrdp start 

  c) Windows運行mstsc遠程桌面連接,輸入IP地址,選擇Xorge,輸入kali 用戶名和密碼即可。

六、卸載vnc

  a)卸載xrdp

root@kali:~# apt-get purge xrdp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  xrdp*
0 upgraded, 0 newly installed, 1 to remove and 199 not upgraded.
After this operation, 2879 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 253222 files and directories currently installed.)
Removing xrdp (0.9.9-1) ...
Processing triggers for man-db (2.8.6.1-1) ...
Processing triggers for libc-bin (2.28-10) ...
(Reading database ... 253147 files and directories currently installed.)
Purging configuration files for xrdp (0.9.9-1) ...
Processing triggers for systemd (241-7) ...
root@kali:~# 

  b) 卸載tightvncserver

root@kali:~# apt-get purge tightvncserver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  tightvncserver*
0 upgraded, 0 newly installed, 1 to remove and 199 not upgraded.
After this operation, 1622 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 253115 files and directories currently installed.)
Removing tightvncserver (1:1.3.9-9) ...
Processing triggers for man-db (2.8.6.1-1) ...
root@kali:~#

本文參考:

https://blog.csdn.net/wangqingliang2012/article/details/83070447

https://blog.csdn.net/gx262091291/article/details/71774482/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM