Forem

Kaarunakaran
Kaarunakaran

Posted on

RDP in Linux

Most Linux machines do not have RDP enabled. Use SSH or install a desktop environment like xRDP.

To enable Remote Desktop Protocol (RDP) on an Azure Virtual Machine running Linux, you will need to install a desktop environment and an RDP server like xRDP. Here are the steps to do that:

Step 1: Create and Access Your Azure VM

  1. Create the VM:

    • Log in to your Azure Portal.
    • Create a new VM, select the appropriate options for your needs (OS, size, etc.).
  2. Access the VM:

    • Once your VM is created, access it via SSH:
     ssh your-username@your-vm-ip-address
    

Step 2: Install Desktop Environment and xRDP

  1. Update the package list:
   sudo apt update
Enter fullscreen mode Exit fullscreen mode
  1. Install a desktop environment (e.g., Xfce):
   sudo apt install xfce4 xfce4-goodies
Enter fullscreen mode Exit fullscreen mode
  1. Install xRDP:
   sudo apt install xrdp
Enter fullscreen mode Exit fullscreen mode
  1. Enable and start the xRDP service:
   sudo systemctl enable xrdp
   sudo systemctl start xrdp
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure xRDP

  1. Add the xRDP user to the ssl-cert group:
   sudo adduser xrdp ssl-cert
Enter fullscreen mode Exit fullscreen mode
  1. Set Xfce as the default session for xRDP:
   echo xfce4-session >~/.xsession
Enter fullscreen mode Exit fullscreen mode
  1. Restart the xRDP service:
   sudo systemctl restart xrdp
Enter fullscreen mode Exit fullscreen mode

Step 4: Open Port 3389 on Azure Network Security Group (NSG)

  1. Go to the Azure Portal.
  2. Navigate to your VM and select Networking under Settings.
  3. Add an inbound port rule for port 3389.

Step 5: Connect to Your Linux VM via RDP

  1. Open Remote Desktop Connection on your local machine.
  2. Enter the IP address of your Azure VM.
  3. Log in using your username and password created on the VM.

You should now be able to access your Linux VM using RDP.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay