username for the Ubuntu VMs: osboxes password: osboxes.org username for the CentOS VMs: root password: reverse ------------------------------- To be able to use the network interface (NI) configured with "host-only" we need to start the dhcp client, that will contact the DHCP server implemented in VirtualBox's Host Network Manager we will use the DHCP client either in the manner described here, or see lower for more variants of this command: sudo dhclient ens0p8 This command will work only if we provided correctly the name if the NI of the host-only type. To be able to find out this name we can use one of the following two variants: ip address or ifconfig We can then read the names of the NIs. On my computer they are called ensop3 and ensop8. The first one got the IP 10.0.2.15 . This is the NI configured with NAT. The other one is the one for which the dhcp client (if launched) will obtain an IP address from the DHCP server (the Host Network Manager that we configured in VirtualBox) The ifconfig is not automatically installed in the distribution that you have and you might need to install it by installing the net-tools package, using this command: sudo apt install net-tools --------------------------------- The dhclient command a) sudo dhclient Activates all the network interfaces (NI), b) sudo dhclient ens0p8 Activates only the NI called ens0p8 c) sudo dhclient -r This command requires a release of all the addresses received through dhcp. Actually it also stops the dhclient program. We can get back new IPs for the network interfaces using the commands similar to those from points a) or b). I'd recommend the one from point a) because will bring back new IPs for all the network interfaces. d) We can also use the following trick, knowing that for the osboxes user (as for any user) it's own configuration file for bash will be launched. That file is located in the user's home directory and is called .bashrc. So, by writing the command at the end of that file we will have dhclient start automatically. Since we are only editing the .bashrc file of one user, this will work only for that user. So we will still need to repeat tha trick for the other users as well. This means this is not a permanent solution, but will do for now. echo "echo osboxes.org | sudo -S dhclient" >> ~/.bashrc --------------------------------------- I had a problem with package (programs) instalation because I was blocked by the proxy on reasons of "untrustworty servers". I've found the following solution on v. Most likely that you won't need to do this. 1) first we switch temporarely as administrator (root) with the comand: sudo su 2) We create the following file /etc/apt/apt.conf.d/99verify-peer.conf with the command touch /etc/apt/apt.conf.d/99verify-peer.conf 3) Then we add at the end of the file we creates a line: echo >> /etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }" 4) At the end we disconect from root with the command: exit --------------------------------------- Installing the ssh server: sudo apt install openssh-server ---------------------------------------- To allow concetions to the ssh server from the firewall: sudo ufw allow ssh ---------------------------------------- Configuration of the .bashrc file so that the dhclient start automatically. The following command will write at the end of the file (append) the command to start the dhclient automatically. This will only work for the current user, on whose .bashrc file we are adding the line at the end. echo "echo osboxes.org | sudo -S dhclient" >> ~/.bashrc ---------------------------------------- After installing new packages, you would need to do that, sometimes because some are not functioning well without this command sudo apt update ---------------------------------------- sudo apt install ca-certificates