I've had a tough time trying to find a solution that specifically deals with accessing a virtualbox Ubuntu server from windows.
The objective is to have two adapters set. Adapter 1 is NAT and would be used to provide internet access for the guest machine (the linux server) so that there apt-get is possible. I do not want the virtual machine to be accessible from the external web so I am not wanting a bridged adapter in this instance.
Adapter 2 is a host-only network adapter that is not using DHCP since it going to have a static IP address with the intention of being the IP address the host machine uses for accessing the VM with Putty.
I have set up and configured a host-only adapter via VirtualBox general settings and it has the IPv4 address/Mask of 192.168.194.3/24. I have configured this to be set up manually and gave it the IP address of 192.168.194.3 and the network mask: 255.255.255.0.
the /etc/network/interfaces file has been modified to reflect a static ip address at network adapter enp0s8 (the host-only adapter #2)
auto enp0s8 iface enp0s8 inet static address 192.168.194.3 netmask 255.255.255.0
From my windows host computer, I can ping 192.168.194.3 and get a response.
I have installed openssh-server on the linux guest and it is running. It claims to be running and listening on 0.0.0.0 port 22.
What is the appropriate way for me to set up and configure things so that I am not using a bridged network adapter and am still able to use NAT but I connect to the VM through a static IP assigned to the 2nd adapter which is a host-only adapter? I believe this is possible, but I could use some assistance.
Thanks in advance