Once you see that SSH is running we will need the local IP address that VirtualBox is using internall for this Virtual Machine. VirtualBox will automatically assign an IP address for this new Host-only network, like below: Ensure DHCP Server is disabled. (Unless configured otherwise.) In the left pane of the Preferences window, select Network to access global VirtualBox network settings, then double click your existing NAT network to edit the settings (you can also add a new network or delete an existing network by clicking the + or x icons). Do ssh -p 2222 127.0.0.1. VirtualBox will create a private network (10.0.2.x) which will be connected to your host network using NAT. VirtualBox version 6.1.8 w/ Extensions & Guest Additions installed. Setup SSH access between VirtualBox Host and Guest VMs 43. In that case I recommend #2. That's the price of Sandboxing. This means that you cannot directly access any host of the private network from the host network.

Do you know why? I searched for answers for my question but came up with different results. You just have to make the Port Forwards from the Server in the NAT. The NAT DHCP server provides a boot file name of the form vmname.pxe if the directory TFTP exists in the directory where the user's VirtualBox.xml file is kept. It …

thanks. This did not work (connection refused). Reverse SSH Tunnels aren't complicated. I did that but it still gives me (connection refused). Attempting to SSH to Debian 10 w/NAT using another computer. Host: Fedora 32, Guest: Debian 10. Shazly. So I thought I’d ask, not sure if this is the correct forum though. Guy McArthur. I needed to set up port forwarding on the guest’s first adapter (NAT), e.g. from 2222 on the host to 22 on the guest and ssh to the former. (Unless configured otherwise.) It's pretty straight forward, it just means you can't make the SSH connections directly from the host. To do so we can run ifconfig and filter it for lines that contain the string “inet addr”.

Once that’s been configured, you can assign this Host-only private network as a second adapter on your VM (the first being a NAT adapter).