Tuesday, December 20, 2016

How to enable remote desktop on Azure Linux VM

In Windows Azure Linux VM there is no direct way to remote desktop Azure VM. So in this blog post, We are going to learn how we can enable the remote desktop on Azure Linux VM.  If you don’t know how to create a Linux VM then there is a ton of articles available that how you can create a Linux VM.  Following a Microsoft, Docs links for creating an Azure Linux VM.

https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-quick-create-portal

After creating a new Linux VM, the first thing you need to have SSH Client to connect the Azure VM. I have windows machine and Putty is one of most well known SSH client for the windows. So If you don’t have SSH Client download Putty from the following link.

http://www.putty.org/

Once you create a VM you will get any public IP like following.

azure-linux-vm-public-key

So copy that public IP and then open Putty and paste the public IP like following.

putty-client-for-linux-vm

Now once you are done with it click on open button. It will ask for your username/password. The key thing to remember here when you create Linux VM you have selected username and password. If you have a public key then you need to supply that key to Putty.

login-password-for-putty-azure-linux-vm

Once we got connected, We need to enable the gnome desktop in our Ubuntu Server first we need to get the latest update of it and for that, we need the following command.

sudo apt-get update
Once the update is done.  Now It’s time to run install ubuntu-desktop command.

sudo apt-get install ubuntu-desktop
It will enable the Remote Desktop and Desktop UI to Ubuntu Server VM.

Note: Here I have created a Ubuntu server in Azure Linux VM. But you can use any flavour of  Linux available in Azure VM. There will be different command for each flavour you can find the complete list at following location- https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-classic-remote-desktop
Once you run the command it will take some time for running and installing desktop for the server.

update-linux-vm-install-desktop

Now its time to install remote desktop in the server for that you need to run the following command.

sudo apt-get install xrdp
Once done with that try to remote login with Windows Remote Client.

image

Note: Sometime you  now allow the remote connection that is because with Azure VM default port is not allowed for remote desktop. So for that goto the following page and do as said to allow remote tcp ip port- https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-troubleshoot-rdp-connection
And I am able to login to my Azure Linux VM.

image
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews