一、配置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