Adding VirtualBox Simple External authentication

If you don’t want to use Null, Guest or External Host authentication when using VirtualBox Remote Display, one can add an extra external option called VBoxAuthSimple as explained here: http://www.virtualbox.org/manual/ch07.html#vbox-auth . You will use a separate password for connecting remotely to the VirtualBox’ Guest.  This username/password will be stored in the machine’s XML settings file.

(trouble with mstsc.exe?)

Install Extension Pack

First make sure you have installed the VirtualBox Extension Pack (!), otherwise this functionality does not work at all! It looks like this would work without, because the Remote Desktop Server Port option is available without installing it, but it isn’t!

Setup VBoxAuthSimple authentication

First setup VBoxAuthSimple authentication for VirtualBox itself.

> VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"

Setup user/pass for Virtual Machine

Now you need to configure the authentication type to ‘external’ for the Virtual Machine (shut it down first). You will create a new password hash and use this when adding a user.

> VBoxManage list vms
"Linux Server" {62d2f35d-25b5-4c24-8d04-3b495d967382}

> VBoxManage modifyvm "Linux Server" --vrdeauthtype external

> VBoxManage internalcommands passwordhash "tiger"
Password hash: f15c16b99f82d8201767d3a841ff...

> VBoxManage setextradata "Linux Server" "VBoxAuthSimple/users/scott" f15c16b99f82d8201767d3a841ff...

(The hashed password is appended to the command line!)

You can add the VirtualBox install directory %VBOX_INSTALL_PATH% to your path.

Using Miscrosoft’s Remote Desktop Connection

Pleas read my other blog VirtualBox VRDP authentication fails with mstsc.exe when you want to use mstsc.exe for connecting, because you must use ‘Save Credentials’ in order to make this work.

Happy connecting!

Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *