Azure, Cloud Training, VMware

4 Mins Read

Your Guide on How to Take the RDP of an Ubuntu VM in Azure

Overview

We all know we can take SSH of Ubuntu VM/Servers instead of taking the RDP as Windows VM and work on CLI (Command Line Interface). 

Here is you can take the RDP of Ubuntu Servers too: 

  • SSH stands for Secure Shell, a network protocol used for secure communication between two computers over an unsecured network, such as the Internet. It provides a secure channel for remote login, file transfer, and other network services. 
  • RDP stands for Remote Desktop Protocol, a proprietary protocol Microsoft developed for remote access to graphical desktops and applications over a network. Using a graphical user interface, RDP enables users to connect to and control a Windows-based computer or server remotely. 

Prerequisites

  • The VM must be up and in a running state. 
  • The VM’s network interface (NIC) should have a Public IP Address. 
  • An Inbound network security group (NSG) rule should be added if not present with destination port 22. 
  • SSH -Port 22 and RDP -Port 3389 should be allowed in Inbound Port Rules. 
Check all the prerequisites, and once all checks are done, go to Google and download PuTTY. (If not installed in your local system). Click here to download. (64-bit x86 recommended).  

Access to Unlimited* Azure Trainings at the cost of 2 with Azure Mastery Pass

  • Microsoft Certified Instructor led Sessions
  • Hands-on Labs
  • EMI starting @ INR 4999*
Subscribe Now

Install Putty simultaneously, which will take 1 or 2 minutes:

Once finished with installing Putty, go to the Azure Portal and the Virtual Machine. Copy the Public IP from there and paste that into Putty. (Refer to the Snip below). 


Open PuTTY in the local machine and paste the Public IP address here. 


Click Open and insert the username and password to take the SSH. 


Now you have taken the SSH of an Ubuntu VM/Server successfully. 

Now follow the below-mentioned steps:

  • Step 1: 


 Run the command. 

sudo apt-get update.  

It will update the package lists for available software packages from the repositories configured on the system. The command downloads the latest package information from the repositories and updates the local package database on the system. This is an important step before installing or upgrading any software package, as it ensures that the latest version is available for installation. 

  • Step 2: 


Run the command. 

sudo apt-get install xfce4. 

It will install the Xfce desktop environment. Xfce is a lightweight desktop environment designed to be fast and efficient, and it is a popular choice for users who prefer a simple and customizable interface. After executing this command, the system will download and install the required packages for the Xfce desktop environment and configure the system to use Xfce as the default desktop environment. 

After pressing enter, wait for a second and hit Yes [Y]. 


Wait for a few minutes now.  

  • Step 3: 


Run the command. 

sudo apt-get install xrdp.

It will install the XRDP package, which provides an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) server. This allows remote users to connect to the Linux system over the network using an RDP client and access a graphical desktop environment. After executing this command, the system will download and install the required packages for the XRDP server and configure the system to accept incoming RDP connections. 

After pressing enter, wait for a second and hit Yes [Y]. 

Wait for another few minutes to get it completed. 

  • Step 4: 

Once completed, we must ensure the RDP is perfectly installed and using xfce. 


For that, Run the command. 

echo xfce4-session > ~/.xsession. 

The system will start the Xfce desktop environment when the user logs in to the X Window System. 

  • Step 5: 

Once it is done, Restart the RDP. 


Run the command. 

sudo xrdp restart.

After executing this command, the system will restart the XRDP server, and any active RDP sessions will be disconnected. Users will need to reconnect to the XRDP server after it has restarted to resume their remote desktop sessions. 

Now, go back to the Azure portal, and if you want, you can add the DNS Name to take the RDP; else, you can directly copy the Public IP address and open the Remote desktop. Paste the IP address there. 

Connect

After successfully taking the RDP of the Ubuntu VM/Server, this login page will pop up where you need to enter the Machines/Servers Login Credentials and login to the VM. 


Provide the username and password. 

Here you go!! 

This way, you can take the RDP of an Ubuntu VM/Server and work using GUI instead of CLI. 

Revolutionize Your Data Center with VMware

  • Understand new features
  • Best practices available
  • Instructor led courses
Learn more

About CloudThat

Incepted in 2012 is the first Indian organization to offer Cloud training and consultancy for mid-market and enterprise clients. Our business goal is to provide global services on Cloud Engineering, Cloud Training, and Cloud Expert Line. The expertise in all major cloud platforms including Microsoft Azure, Amazon Web Services (AWS), VMware, and Google Cloud Platform (GCP) position us as pioneers in the realm. 

WRITTEN BY Ritesh Agrawal

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!