首页 > 代码库 > 折腾kali
折腾kali
kali的配置文件和rhel还是有些不同,之前也没怎么玩过kali,一上手就遇到两个问题,如何配置静态IP,无法使用root用户远程连接。
静态IP配置
root@kali:/etc# cat /etc/network/interfaces
# 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
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
#iface eth0 inet dhcp
address 192.168.110.10
netmask 255.255.255.0
gateway 192.168.110.1
重启网络服务
root@kali:/etc# /etc/init.d/networking restart
DNS设置
root@kali:/etc# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 114.114.114.114
ssh远程root用户登录
默认情况kali只允许普通用户远程登录
需要修改ssh服务的配置项
root@kali:/etc# vim /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
重启sshd服务
root@kali:~# /etc/init.d/ssh restart
这里遇到一个奇葩的问题,当我把ssh服务停掉后,已有的ssh远程连接依旧保持连接状态。
本文出自 “荆棘鸟” 博客,请务必保留此出处http://xjh100000.blog.51cto.com/6740366/1845990
折腾kali