码迷,mamicode.com
首页 > 其他好文 > 详细

折腾kali

时间:2016-09-03 22:43:41      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:kali、ssh、networking

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

标签:kali、ssh、networking

原文地址:http://xjh100000.blog.51cto.com/6740366/1845990

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!