Connect to a VirtualBox guest machine with SSH and HTTP

You can easily setup a VBox VM to allow ssh and http connection from your host machine. See http://sk.c-wd.net/wp/2008/01/05/virtualbox-port-forwarding-with-linux-h... and http://mydebian.blogdns.org/?p=111

On MacBook Pro, this is the settings I needed as they appear in Library/VirtualBox/Machines/guestname/guestname.xml:

      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort" value="22"/>
      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort" value="2222"/>
      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol" value="TCP"/>
      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/www/GuestPort" value="80"/>
      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/www/HostPort" value="8080"/>
      <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/www/Protocol" value="TCP"/>

I've also attached a complete guestname.xml file for the records.

Comments

Add new comment