Enabling RDP on a Linux instance running in Azure

Posted by on Dec 30, 2014 in Azure

This post is a quick instruction on how you can enable the RDP protocol in an Azure linux instance. Why would you want to do this? Well, although you’ll probably want to SSH into the box for the majority of times, there are instances where GUI access is handy. If, like me, you like to consolidate all your RDP session (I personally use the excellent mRemoteNG ) then having this enabled is useful. Thankfully, getting RDP working on an Azure Linux instance is trivial.
In my case, I’ll be using Ubuntu 14.04:

Update apt-get to make sure your sources are up to date. If you don’t do this then you’ll get 404 errors in the next step

Once your repository is fully up to date, you can install a desktop. I’ll stick with the default, Ubuntu Unity. I’m not a massive fan of Unity but given the little time I’ll spend in here, it will suffuce.

This will take several minutes, so go make a coffee. Once you have a desktop environment installed, you can enable RDP:

The last thing to do is to open the RDP port on the Azure firewall. By default it isn’t enabled, so log into the Azure portal, select your Linux VM, go to the endpoints tab and add RDP to the list of open endponts

Once that is done and the Azure configuration has been applied, you should be set to go!