一、配置kali使用xshell連接
查看ssh服務狀態
# service ssh status

開啟ssh服務
# service ssh start
修改ssh配置文件
# vi /etc/ssh/sshd_config
PasswordAuthentication yes
去掉前面的井號注釋符

#PermitRootLogin prohibit-password
改為
PermitRootLogin yes

重啟ssh服務
# service ssh restart
二、修改軟件源
# vi /etc/apt/sources.list
#aliyun 阿里雲 deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib # ustc 中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib #deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free #deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free # kali 官方源 deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib
更新一下源
# apt-get update
root@kali:~# apt-get update 獲取:1 http://mirrors.aliyun.com/kali kali-rolling InRelease [30.5 kB] 獲取:2 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [30.5 kB] 獲取:3 http://mirrors.ustc.edu.cn/kali kali-rolling/non-free Sources [135 kB] 獲取:4 http://mirrors.aliyun.com/kali kali-rolling/non-free Sources [135 kB] 0% [4 Sources store 0 B] [正在等待報頭] [3 Sources 115 kB/135 kB 86%] [ 獲取:5 http://mirrors.aliyun.com/kali kali-rolling/contrib Sources [63.7 kB] 0% [5 Sources 2,301 B/63.7 kB 4%] [3 Sources 125 kB/135 kB 93%] [正在等待 0% [5 Sources store 0 B] [正在等待報頭] [3 Sources 125 kB/135 kB 93%] [ 獲取:6 http://mirrors.aliyun.com/kali kali-rolling/main Sources [12.8 MB] 0% [3 Sources store 0 B] [6 Sources 18.3 kB/12.8 MB 0%] [正在等待報頭] [ 獲取:7 http://mirrors.ustc.edu.cn/kali kali-rolling/contrib Sources [63.7 kB] 0% [6 Sources 382 kB/12.8 MB 3%] [7 Sources 1,440 B/63.7 kB 2%] [正在等待 獲取:8 http://mirrors.ustc.edu.cn/kali kali-rolling/main Sources [12.8 MB] 0% [6 Sources 956 kB/12.8 MB 7%] [8 Sources 32.4 kB/12.8 MB 0%] [正在等待% [7 So0% [6 Sources 956 kB/12.8 MB 7%] [8 Sources 93.6 kB/12.8 MB 1%] [正在等待 獲取:9 http://mirrors.neusoft.edu.cn/kali kali-rolling InRelease [30.5 kB] 獲取:10 http://mirrors.aliyun.com/kali kali-rolling/main amd64 Packages [17.1 MB] 獲取:11 http://mirrors.neusoft.edu.cn/kali kali-rolling/main Sources [12.8 MB] 獲取:12 http://mirrors.aliyun.com/kali kali-rolling/non-free amd64 Packages [187 kB] 獲取:13 http://mirrors.aliyun.com/kali kali-rolling/contrib amd64 Packages [105 kB] 獲取:14 http://mirrors.ustc.edu.cn/kali kali-rolling/main amd64 Packages [17.1 MB] 獲取:15 http://mirrors.ustc.edu.cn/kali kali-rolling/non-free amd64 Packages [187 kB] 獲取:16 http://mirrors.ustc.edu.cn/kali kali-rolling/contrib amd64 Packages [105 kB] 獲取:17 http://mirrors.neusoft.edu.cn/kali kali-rolling/non-free Sources [135 kB] 獲取:18 http://mirrors.neusoft.edu.cn/kali kali-rolling/contrib Sources [63.7 kB] 獲取:19 http://mirrors.neusoft.edu.cn/kali kali-rolling/main amd64 Packages [17.1 MB] 獲取:20 http://mirrors.neusoft.edu.cn/kali kali-rolling/non-free amd64 Packages [188 kB] 獲取:21 http://mirrors.neusoft.edu.cn/kali kali-rolling/contrib amd64 Packages [105 kB] 已下載 91.0 MB,耗時 1分 21秒 (1,127 kB/s) 正在讀取軟件包列表... 完成
更新軟件
# apt-get upgrade
出現如下錯誤提示(我選擇忽略)
已下載 1,398 MB,耗時 3分 38秒 (6,407 kB/s) E: 無法下載 http://mirrors.neusoft.edu.cn/kali/pool/main/a/atftp/atftpd_0.7.git20120829-3.1_amd64.deb 連接超時 [IP: 219.216.128.25 80] E: 有幾個軟件包無法下載,要不運行 apt-get update 或者加上 --fix-missing 的選項再試試?
更新系統
# apt-get dist-upgrade
清理安裝包
# apt-get clean
# apt-get autoclean
root@kali:~# apt-get clean root@kali:~# apt-get autoclean 正在讀取軟件包列表... 完成 正在分析軟件包的依賴關系樹 正在讀取狀態信息... 完成
三、配置網絡
編輯網絡配置文件
# vi /etc/network/interfaces
靜態IP配置
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface # Loop回環地址 auto lo iface lo inet loopback #將網卡eth0設置為靜態IP auto eth0 iface eth0 inet static #修改IP、子網掩碼、網關 address 192.168.100.50 netmask 255.255.255.0 gateway 192.168.100.2
配置動態ip
#Loop回環地址
auto lo
iface lo inet loopback
#將網卡eth0設置為DHCP自動獲取
auto eth0
iface eth0 inet dhcp
修改DNS
# vi /etc/resolv.conf
root@kali:~# vi /etc/resolv.conf # Generated by NetworkManager nameserver 192.168.100.2
重啟網卡
# /etc/init.d/networking restart

立馬查看IP地址后,出現了兩個ip地址……

過會查看后,修改成功

四、配置vnc遠程桌面連接
安裝vnc服務,默認會自動安裝
# apt-get install tightvncserver
root@kali:~# apt-get install tightvncserver 正在讀取軟件包列表... 完成 正在分析軟件包的依賴關系樹 正在讀取狀態信息... 完成 tightvncserver 已經是最新版 (1:1.3.9-9)。 tightvncserver 已設置為手動安裝。 下列軟件包是自動安裝的並且現在不需要了: libboost-program-options1.67.0 libboost-python1.62.0 libboost-serialization1.67.0 libboost-system1.62.0 libboost-test1.67.0 libboost-thread1.62.0 libboost-timer1.67.0 libcgal13 libcharls1 libcrypt2 libfcgi-bin libfcgi0ldbl libicu-le-hb0 libicu60 liblwgeom-2.5-0 liblwgeom-dev libmozjs-52-0 libpoppler80 libpyside1.2 libpython3.6 libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libqca2 libqca2-plugins libqgis-analysis2.18.25 libqgis-analysis2.18.28 libqgis-core2.18.25 libqgis-core2.18.28 libqgis-customwidgets libqgis-gui2.18.25 libqgis-gui2.18.28 libqgis-networkanalysis2.18.25 libqgis-networkanalysis2.18.28 libqgis-server2.18.25 libqgis-server2.18.28 libqgispython2.18.25 libqgispython2.18.28 libqtwebkit4 libqwt6abi1 libradare2-3.1 libsfcgal1 libshiboken1.2v5 libspatialindex4v5 libspatialindex5 libwhisker2-perl python-cycler python-kiwisolver python-matplotlib python-matplotlib2-data python-nassl python-owslib python-pyproj python-pyside.qtcore python-pyside.qtgui python-pyside.qtnetwork python-pyside.qtwebkit python-pyspatialite python-qgis python-qgis-common python-qt4-sql python-shapely python-subprocess32 python3-iso8601 python3.6 python3.6-dev python3.6-minimal qt4-designer ruby-dm-serializer ruby-faraday ruby-geoip ruby-libv8 ruby-ref ruby-therubyracer 使用'apt autoremove'來卸載它(它們)。 升級了 0 個軟件包,新安裝了 0 個軟件包,要卸載 0 個軟件包,有 19 個軟件包未被升級。
查看安裝信息
# dpkg -l tightvncserver
root@kali:~# dpkg -l tightvncserver 期望狀態=未知(u)/安裝(i)/刪除(r)/清除(p)/保持(h) | 狀態=未安裝(n)/已安裝(i)/僅存配置(c)/僅解壓縮(U)/配置失敗(F)/不完全安裝(H)/觸發器等待(W)/觸發器未決(T) |/ 錯誤?=(無)/須重裝(R) (狀態,錯誤:大寫=故障) ||/ 名稱 版本 體系結構 描述 +++-==============-============-============-========================================= ii tightvncserver 1:1.3.9-9 amd64 virtual network computing server software
安裝完之后,開啟vnc連接並設置密碼
# tightvncserver
root@kali:~# tightvncserver You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? y Password: Verify: Warning: kali:1 is taken because of /tmp/.X11-unix/X1 Remove this file if there is no X server kali:1 New 'X' desktop is kali:2 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/kali:2.log
打開vnc客戶端
Server:kali的IP地址:2
192.168.100.110:2

輸入設置的vnc連接密碼

登錄連接后黑屏

額……
五、安裝vmware tools
點擊虛擬機VMware tools安裝

復制安裝包到桌面
# cp /media/cdrom/VMwareTools-10.0.10-4301679.tar.gz .
root@kali:~# cp /media/cdrom/VMwareTools-10.0.10-4301679.tar.gz . root@kali:~# root@kali:~# ls 公共 下載 driftnet-1.jpeg driftnet-4.png 模板 音樂 driftnet-1.png driftnet-5.jpeg 視頻 桌面 driftnet-2.jpeg VMwareTools-10.0.10-4301679.tar.gz 圖片 driftnet-0.jpeg driftnet-3.jpeg 文檔 driftnet-0.png driftnet-4.jpeg
解壓文件
# tar zxf VMwareTools-10.0.10-4301679.tar.gz
root@kali:~# tar zxf VMwareTools-10.0.10-4301679.tar.gz root@kali:~# ls 公共 下載 driftnet-1.jpeg driftnet-4.png 模板 音樂 driftnet-1.png driftnet-5.jpeg 視頻 桌面 driftnet-2.jpeg VMwareTools-10.0.10-4301679.tar.gz 圖片 driftnet-0.jpeg driftnet-3.jpeg vmware-tools-distrib 文檔 driftnet-0.png driftnet-4.jpeg root@kali:~# root@kali:~# cd vmware-tools-distrib/ root@kali:~/vmware-tools-distrib# root@kali:~/vmware-tools-distrib# ls bin doc FILES installer vgauth vmware-install.real.pl caf etc INSTALL lib vmware-install.pl
開始安裝VMware tools
# vmware-tools-distrib/vmware-install.pl
這個時候程序就開始安裝VMware tools,然后再安裝的過程中會出現一些路徑,讓你輸入,一般情況下,這種路徑都會使用默認設置,直接敲回車鍵即可。所有讓你輸入的地方都直接敲回車鍵。敲完以后會顯示一個defaults字樣,即采用默認設置。
一直到不需要你輸入以后,它就開始拷貝文件,啟動服務進程等。然后一直等到出現下面圖中的字樣說明安裝好了,如下面圖中所示,會顯示
Enjoy
-- the VMware Team

end
