Kali 本地网络配置
1.1 永久配置IP地址
-
将虚拟机设置中的网络适配器设置为NET模式
-
修改网卡配置文件
sudo vim etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static #配置eth0使用静态地址 address 192.168.188.53 #配置eth0的固定IP地址 netmask 255.255.255.0 #配置子网掩码 getway 192.168.188.1 #配置网关
-
配置DNS
sudo vim /etc/resolv.conf 文档最后插入DNS地址
# Generated by NetworkManager search localdomain nameserver 8.8.8.8
-
重启网络服务
sudo systemctl restart networking
1.2 配置sshd服务并使用xshell进行连接
-
修改配置文件——允许root用户登录sshd服务
vim /etc/ssh/sshd_config
-
重启ssh服务
/etc/init.d/ssh restart
或者使用systemctl restart ssh
-
将ssh服务加入到开机自启中
sudo update-rc.d ssh enable