VBoxManage modifyvm "$VM_NAME" --vrdeaddress 127.0.0.1 --vrdeport 23771
(any port wil do)
So now the RDP is only on 127.0.0.1 and no one can enter it.
If the host is remote, then the next thing to do is from you development/office/home machine do:
ssh -N -f -L localhost:23771:localhost:23771 user@remotehost
This wil open a port 23771 on YOUR localhost connected to port 23771 on the remote hosts localhost, so to say
After that you can instruct you RDP viewer to connect to 127.0.0.1:23771 and you will have a secure connection with your VM.
By the way, after installing, I do this:
VBoxManage modifyvm "$VM_NAME" --natpf1 "guestssh,tcp,,12222,,22"
VBoxManage modifyvm "$VM_NAME" --boot1 disk
The second line makes the vm boot from disk or else it will always start with the installer !
The first line does portforwarding from the host to the vm's secure shell server (only if you had NAT as network card)
So after install you can do
ssh -p 12222 user@remotehost
where remotehost is the IP address of the host,
but user is the user on the VM.