How to Enable Remote Desktop and Generate an Encrypted Password in Windows Azure
It’s really not a matter of if, but when you will need to troubleshoot your Windows Azure deployment by using Remote Desktop to access one of your instances.
This article will show you how to enable Remote Desktop connections on your Windows Azure subscription, generate a secure encrypted password for your Azure application, and connect to an individual instance after you deploy your Azure project to the cloud.
Configure Windows Azure
First, let’s enable Remote Desktop connections in our Windows Azure subscription. In the Windows Azure Management Portal select deployed Web Role and click the
configure button at the top of your Management Portal’s UI.
Next, fill out the following form with the desired login credentials. Remember, this is the username and password combination that you will end up using with Remote Desktop.
Once this is complete, your Windows Azure subscription is now configured to allow Remote Desktop connections. Congratulations!
Now that our Azure subscription is configured, we need to update our Azure application’s configuration settings to match what we just set up in the cloud. The first thing we need to do is generate an encrypted password using the thumbprint of our newly uploaded
Windows Azure Tools certificate. The Windows Azure SDK has a command prompt that will allow us to encrypt our Remote Desktop password.
In the Windows Azure Command Prompt
(Start => All Programs => Windows Azure SDK for .NET => Windows Azure Command Prompt) type the following:
csencrypt encrypt-password -CopyToClipboard -Thumbprint "<Azure Tools Thumbprint>"
You will be prompted for a password, type the same password here as you did in the Windows Azure Management Portal.
csencrypt is finished executing you will have a shiny new encrypted password which will enable you to remote into your Windows Azure instance.
Next, all you have to do is update your
<Role ....> <ConfigurationSettings> <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="<Password Here>" /> <ConfigurationSettings> </Role>
After you have your Service Configuration updated, package and deploy your Azure project.
If this doesn’t work the first time around, hit
F5 in your Windows Azure Management Portal to refresh the page and try again. I’m not sure why this is an issue, but it’s worked for me in the past.