Setup VirtualBox Host SSH

When you deploy a VirtualBox guest system, it will not, by default, be accessible from your local system. The guest systems are not connected to the same network as your local machine. In order to SSH into one of the guest system, you will need to setup port forwarding of the guest system’s network adaptor.

Version Notes: Created on September 19, 2023. Covers version 7.0.10 of Oracle VirtualBox on Windows 11 and PuTTY v0.79.


Update the Virtual Guest Settings


Open Network Adapter Settings


Add Port Forwarding Rule

Network Address Translation (NAT) allows you to connect to a port on your local system and have that traffic directed to a different port on the guest system. We will set this up so that when we connect to the localhost using a certain port, it will connect to the SSH port on the guest.


Connect via PuTTY

If you are using OpenSSH, you can skip this section.


Connect via OpenSSH

You can also connect using OpenSSH from a Windows Terminal.

$ ssh -p 2215 localhost

All Done

You should get the standard warning asking you to confirm the fingerprint. You should then have a command prompt on your VirtualBox guest system.