How to SSH to Virtualbox guest

In Virtualbox guest, open setting->network setting->port forwarding,

Add a new Rule:

change the "Host port" to the port you want to use as forwarding, say 3022.

"Guest port" to 22.

Leave others as it is or blank.

Still in Vritualbox guest, install openssh-server:

sudo apt-get install openssh-server

On the host machine, ssh to VM using the following command:

ssh -p 3022 username@



Write a comment

Captcha image


Type the number you see in the image above: