Kali Rolling Virtualbox5 SSH+Guest Addition增强包

来源:互联网 发布:炒股什么软件好 编辑:程序博客网 时间:2024/06/10 15:50

在VirtualBox上安装了Kali Rolling 2016.1之后,需要调整两个东西:

1. 配置root能SSH登陆;

2. 类似其他版本的Linux,给Kali虚机安装VirtualBox的增强包,以便虚机能全屏,虚机宿主机间鼠标能便捷移动及文件共享。


一、配置root能SSH Kali

默认情况下,安装Kali后只有root用户。而OpenSSH从版本7开始就调整了PermitRootLogin的默认选项从yes到prohibit-password(without-password的同义且语义改良参数),官方发版说明如下。所以更改为yes先。并且运行默认关闭的sshd:systemctl start sshd。(Ubuntu情况一样,CentOS默认root能SSH)

Potentially-incompatible Changes--------------------------------...* The default for the sshd_config(5) PermitRootLogin option has   changed from "yes" to "prohibit-password".* PermitRootLogin=without-password/prohibit-password now bans all   interactive authentication methods, allowing only public-key,   hostbased and GSSAPI authentication (previously it permitted   keyboard-interactive and password-less authentication if those   were enabled)....New Features------------* sshd_config(5): PermitRootLogin now accepts an argument of   'prohibit-password' as a less-ambiguous synonym of 'without-   password'....

# systemctl start sshd# sed -i '$isystemctl start sshd' /etc/rc.local /*开机启动sshd*/


二、给Kali安装VirtualBox的增强包

如同其他Linux系统一样,安装这个增强包之前,都需要更新安装下linux-headers-$(uname -r),甚至kernel-devel-$(uname -r)、gcc等增强包所需要的组件。而在安装Kali的时候,我没有指定网络镜像地址。所以这里首先需要手动的去更新下/etc/apt/source.list中的包源,默认空白如下;然后再安装增强包。

# deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:14]/ ...#deb cdrom:[Debian GNU/Linux 2016.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20160120-18:14]/ ...#这里我加入两个包源,分别为阿里和中科大的免费源,国内此类镜像蛮多的。deb http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-freedeb-src http://mirrors.aliyun.com/kali-security kali-rolling/updates main contrib non-freedeb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contribdeb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

# apt-get update# apt-get install -y virtualbox-guest-x11 /*1. 当前Kali Rolling版本中直接安装这个包*/# apt-get install -y linux-headers-`uname -r` /*2. 老点的Kali版本用这个包*/# cd /media/cdrom /*这里把增强包挂上去:Devices->Insert Guest Additions CD Image...*/# sh VBoxLinuxAdditions.run /*忽视“The headers for the current running kernel were not found..."# apt-get install -y kernel-headers-`uname -r` /*是没有这个包的,直接忽略上面的提示*/# reboot /*最后重启系统即可*/# apt-get dist-upgrade -y /*也可以更新下系统*/


0 0
原创粉丝点击