how to ssh into a guest VM

if a virtualbox VM is created using the default network configuration, it is set to use NAT from the host interface. To enable access to the VM’s network ports, one can configure port forwarding for the VM in the VirtualBox GUI. We’ll use these settings:

Table 1. Settings
system ip address network port





  • Open the VM’s network settings, and select the Port Forwarding button.

  • Click the Add button

  • Configure the fields as above

To make life ease, one can add a stanza to * $HOME/.ssh/config * as below:

host vbox
        port 32022