Connecting Linux VM hosted in Azure from Windows 10 using RDP
Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
In one of the previous article – Connecting Linux VM from Windows 10 using puTTY we discussed how to connect Linux server using PuttY from Windows 10
In this article we will discuss how to connect Linux server from Windows 10 using RDP
Detailed steps :
- I have created Linux VM – “KnowledgeJunction-Ubuntu” on my free Azure subscription as
- Next step is I need to connect this Linux VM using RDP and start exploring DOCKER 🙂
- In above Fig – if we notice there is option “Connect” in top navigation bar as
- If we click on “Connect” option we get three options as

- Here we will connect respective Linux VM using RDP option
- Click on “RDP“, we will be redirected to RDP tab as
- As in above Fig, we can “Download RDP File”
- OR just type in “MSTSC” in Windows run box, we will have “Remote Desktop Connection” dialog as
- If we will click on “Connect” on “Remote Desktop Connection” we wont get connected directly, we will get an error as
- To connect the Linux VM in Azure we need Desktop Virtual Environment installed on Linux VM. Its not installed by default
- There are various Desktop Virtual Environments are available but we will use “xfce4“
- To install “xfce4” we need to connect Linux VM using SSH
- Please follow article – Connecting Linux VM from Windows 10 using puTTY for connecting Linux VM using PuttY
- Once we connected through SSH we are ready to install “xfce4” as
sudo apt-get -y install xfce4
- Now we have desktop virtual environment on our Linux VM next step is to configure a remote desktop service (xrdp) to listen for incoming connections – xrdp
- To install xrdp we need to execute following commands
sudo apt-get -y install xrdp
sudo systemctl enable xrdp
- Next step is to update Remote Desktop Service – xrdp what desktop environment to use when we start our session
- To configure xrdp to use xcfe desktop environment, execute following command
echo xfce4-session >~/.xsession
- To have this change we need to restart xrdp service as
sudo service xrdp restart
- Next step is we need to create newtwork security group rule which allows TCP on port 3389 to reach our VM. For this we need to excute “az vm open-port” on port 3389
- To execute “az vm open-port” cmdlet we need AZURE CLI installed on our Linux box. We have detailed article to install AZURE CLI on our LINUX / Ubuntu box – Ubuntu : Installing Azure CLI / Resolving error – ‘az’ command not found / Resolving error – Unable to locate package azure-cli
az vm open-port --resource-group KnowledgeJunction --name KnowledgeJunction-Ubuntu --port 3389
- Once this command executed successfully we are ready to connect the server as
- After successful entering username and password we will be able to connect Linux server 🙂 as
References:
We have very good series of articles on Azure-CLI – https://knowledge-junction.in/?s=azure-cli please have a look once
We have very good series of articles on Ubuntu / Linux – https://knowledge-junction.in/category/technology-articles/linux/
Thanks for reading 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂
2 Responses
[…] follow article – Connecting Linux VM hosted in Azure from Windows 10 using RDP for connecting Linux VM using […]
[…] I was preparing demo for my Docker / Containers session. For this purpose in my Azure trial I have created UBUNTU / Linux box. I need to connect my Ubuntu box using RDP. To connect Ubuntu box using RDP we need to perform several steps, we have detailed article here – Connecting Linux VM hosted in Azure from Windows 10 using RDP […]
You must log in to post a comment.