virtualbox virtual machine and the host access each other

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq1124794084/article/details/90442668

To achieve the host access function, and virtual machines can communicate with each other.

First with the bridge is certainly achievable, but generally restrict network management network, a person can only use a static ip address.

Virtual Internet using NAT function, you can ping the host, but the host ping through virtual machines.

Solutions to achieve the host virtual machines connected by way of port forwarding.

Test virtualbox installed kali

This allows ssh connection go up

kali in open ssh

vi / etc / ssh / sshd_config
the foregoing comments permitrootlogin removed, and yes to later
be removed #PasswordAuthentication no comment, and the NO YES // kali modify the default is yes
then restart ssd service
/etc/init.d / ssh restart

ssh root @ ip -p 2222 in the host machine

The successful connection

 

Guess you like

Origin blog.csdn.net/qq1124794084/article/details/90442668