Search This Blog

Wednesday, July 29, 2020

Enabling remote desktop connection on ubuntu on Azure

Enable remote desktop connection on ubuntu VM on azure

There may be instances when you will need to setup a Linux/Ubuntu VM on a public cloud like azure do quickly do some Poc instead of bothering your own local machine which may not be linux based.

Create Ubuntu (v 18 in my case) VM (Resource Managed)
ssh into VM with Putty
sudo apt-get update
sudo apt-get install lxde
sudo apt-get install xrdp
echo startlxde > ~/.xsession
sudo /etc/init.d/xrdp start
open port 3389 in Azure firewall
RDP to Ubuntu desktop :)

Steps to Open Port 3389 on VM

  1. Sign in to the Azure portal.
  2. In Virtual Machines, select the VM that has the problem.
  3. In Settings, select Networking. 
  4. In Inbound port rules, check whether the port for RDP is set correctly. The following is an example of the configuration:
    1. Priority: 300 (set 310 if 300 is already taken)
    2. Name: Port_3389
    3. Port(Destination): 3389
    4. Protocol: TCP
    5. Source: Any
    6. Destinations: Any
    7. Action: Allow
All Set!