1. Select host-only as the virtualbox connection mode. The virtualbox host-only network is automatically created on the host machine windows.
2. Enable connection sharing for the host machine windows. In this case, the virtualbox host-only network connection IP Address Configuration is set:
IP address ......: 192.168.0.1
Subnet Mask ......: 255.255.255.0
Default Gateway .........:
3. Enter the client installed on the VM, set the IP address of the virtual system to a network segment of the host machine, set the gateway to 192.168.0.1, and set the DNS address to the same as that of the host machine. For example:
IP address ......: 192.168.0.2
Subnet Mask ......: 255.255.255.0
Default Gateway...: 192.168.0.1
DNS servers ......: 202.106.0.20
219.141.136.10
Now the virtual system can access the Internet and communicate with the host machine.
If you still cannot log on to the Virtual Machine Linux system through SSH on the host machine windows, first check whether the sshd service of the virtual system is installed and started. If you cannot log on, go to the virtualbox installation directory and execute the following command:
Vboxmanage modifyvm "ubuntu" -- natpf1 "guestssh, TCP, 2222, 22"
Note: Change Ubuntu to your own virtual system name, such as Debian.
This is when the virtual system is configured. The configuration information is saved in the <Ubuntu>. xml file in the virtual system installation directory.