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@127.0.0.1



  


Comments:

Write a comment
Anonymous

Captcha image

Reload

Type the number you see in the image above: