- Published on : 30 September 2018 at 13:00 UTC
Finally, there is a second possibility to authenticate users for the remote desktop.
This is simple authentication. But, this one requires some lines of commands to be configured.
To get started, run a command prompt (cmd) and type this command to move to the VirtualBox folder :
cd "C:\Program Files\Oracle\VirtualBox"
Then, type this command so that VirtualBox uses the simple type authentication by defaults for remote desktop connections :
VBoxManage setproperty vrdeauthlibrary "VBoxAuthSimple"
If you go in the settings of VirtualBox, via the menu : File -> Settings.
You will see that the default VRDP authentication has become : VBoxAuthSimple.
Then, type the command below to have your virtual machine use external authentication.
Note : "Win 7 x64" is the name of our virtual machine.
VBoxManage modifyvm "Win 7 x64" --vrdeauthtype external
Finally, you must add the login and the passwords of the users that will be able to access the remote desktop in the settings of your virtual machine.
For that, you will have to generate a hash which corresponds to the password that the user will have to use to connect to the desktop of your remote VM.
In our case, we will use this password : iwpass.
To obtain the hash corresponding to this password, we use this command :
VBoxManage internalcommands passwordhash "iwpass"
In our case, this command returned us this result :
Password hash: c0d77fb73ce47042e2ee2d60276bbed8a9e91116387aba28357082b5297fc1e1
Now that we have the hash of our password, we need to add the desired user to the configuration file of our virtual machine.
VBoxManage setextradata "Win 7 x64" "VBoxAuthSimple/users/lionel" c0d77fb73ce47042e2ee2d60276bbed8a9e91116387aba28357082b5297fc1e1
As you can see in the ".vbox" file of your virtual machine, a new "ExtraDataItem" line has appeared with the username chosen previously and the hash corresponding to the desired password.
As before :
- do not forget to check the "Allow me to save credentials" box of the Windows RDP client for the connection to be successful
- specify the IP address of the host PC
- specify the port specified in your virtual machine's settings
Use the user credentials that you just added in the extra data of your virtual machine.
And you are connected remotely to the desktop of your virtual machine using an account defined in the settings of your virtual machine.
For "guest" authentication that is also displayed in the virtual machine settings, it's still being tested by Oracle and is not yet supported.
As you can see in the VirtualBox manual.