Install and configure Remote Desktop to connect to a Linux VM in Azure
Linux virtual machines (VMs) in Azure are usually managed from the command line using an SSH connection. When we are new to Linux, or for quick troubleshooting scenarios, the use of remote desktop may be easier. In this article, we are going to see how to install and configure a desktop environment and remote desktop (xrdp) for your Linux VM.
- Azure Account.
- Linux VM.
- Connect to your Linux VM using SSH
2. Updates the list of files available in the APT repositories in the configuration file
sudo apt-get update
3. Install LXDE
sudo apt-get install lxde
the command will install LXDE which is our desktop environment.
4. Install xrdp
sudo apt-get install xrdp
xrdp is the one which will give us the rdp session.
5. Starting xrdp
sudo /etc/init.d/xrdp start
6. Now after we have installed all the utilities, we are going try to connect via RDP to our Linux Azure VM… it still not working ! Of course we haven’t configure yet the Firewall ! So now let’s set some rules on !
Click on Networking
Than,click on the Network interface name
Select Network security group
We are going to add an Inbound security group.
Click on Inbound security group
Click on the add button
Now we have to fill the fields in such a way that they are the same as in the screen below.
The Inbound security rule will be added to the existing rules
We are done ! Let’s give a try
In this tutorial i am using Microsoft Remote Desktop to connect to the VMs via RDP
Here we are ! We are logged to an Azure Linux VM using an RDP connexion