Connecting to Ubuntu VM on Azure using Remote Desktop Connection

In order to connect to your Ubuntu VM from a Windows first we have to enable the XRDP in the Ubuntu in order enable the Remote Desktop Connection.

So to enable XRDP we should connect to the server, PUTTY is a the commonly used client for SSH. (SSH is enabled by default in the Ubuntu VM on Azure). Download PUTTY from here and follow the steps in this article to connect to the Ubuntu server.

Once connected with username (azureuser) and password execute the following shell command to enable XRDP on the server

sudo apt-get install xrdp

After executing the command go to Microsoft Azure management portal and Add the Remote Desktop Connection endpoint for the server. Once you’ve added this endpoint you can see the connect icon is back to live (earlier it was grayed out) click on the connect icon and download the RDP file for the Remote Desktop Connection.

Now you can connect to your Ubuntu VM from Windows.

Note still your Ubuntu environment has the shell, if you want to enable the interactive desktop execute the following commands in the connection you made.

First I executed this.

sudo apt-get install ubuntu-desktop 

But things there was message saying to run the update, so I executed the update with this command and executed the install command again, everything was fine and smooth.

sudo apt-get update 

Close the connection and connect again, (logoff and reconnect) you will be welcomed with the Ubuntu desktop experience.


For this demonstration I used Ubuntu Server 12.04 LTS


Windows Azure – VMs

Windows Azure provides the facility to host VMs. This is really a cool thing, because if you want a server infrastructure running you can get it done  in few seconds. Windows Azure provides some pre defined images and it offers the flexibility to include the images we have.

The use of the Azure hosted VM is up to. You can use it in the way you want. For example if you want a test server running in Windows Server 2012, simply you can create one and do the testing. Once the testing is done you can simply delete that.

In this post I have provided the images / screenshots that you might see in the process of creating a VM in Windows Azure.

Red marks are manually added to hide some personal details of the page.

Images in order









Once you create the VM you can connect to it.

There’s a known issue when we delete the VM. It’s better to say it as a work load than an issue, when you delete the VM the associated VHD remains undeleted as storage blob.

You might run into an error like this.


This blog article describes how to solve the issue.