Connecting to a VirtualBox Guest Machine

Today I was setting up some test machines running a minimal debian installation.

Since it's not that handy to work always in the virtualbox window, I tried to connect to them by using ssh.

In the debian machine I typed:

$ su
$ apt-get install openssh-server

And tried to connect to the machine. It did not work.

I found plenty instructions how to fix ports and stuff with host-only-networks, but figured out, this is not what I was searching for!

The reason was, that virtualbox's default network mode is NAT.

I changed it to "network bridge". After that a restart of the machine did the trick, my router gave a proper IP to the guest debian.

In open source, virtualbox by
@ 02 Jul 2010, Comments at Reddit & Hackernews