How to Setup an Ubuntu Linux VM in Azure with Remote Desktop (RDP) Access (Ubuntu Desktop GUI)

sudo apt-get update
sudo apt-get install ubuntu-desktop
wget http://c-nergy.be/downloads/xrdp-installer-1.2.1.zip
unzip xrdp-installer-1.2.1.zip
chmod +x xrdp-installer-1.2.1.sh
./xrdp-installer-1.2.1.sh

To implement the sound redirection fix within the xrdp session, use this syntax:

./xrdp-installer-1.2.1.sh -s yes

To implement the lock screen fix for GDM within the xrdp session, use this syntax

./xrdp-installer-1.2.1.sh -g yes

xRDP – How to Fix the Infamous system crash popups in Ubuntu 18.04 (and previous versions)

sudo rm /var/crash/*

Enable RDP in firewall

# ufw enable
# ufw allow 3389/tcp
# ufw status

Credits go to: http://c-nergy.be/blog/?p=12761

How to Setup an Ubuntu Linux VM in Azure with Remote Desktop (RDP) Access

How to Enable and Secure Remote Desktop on Windows

https://www.howtogeek.com/175087/how-to-enable-and-secure-remote-desktop-on-windows/

How to add a new RDP listening port

If you need to add another listening port for your RDP server, for whatever the reason, this howto will show youhow to do it.
Please notice we need to edit the registry, so it always best to BACKUP the REGISTRY before you doing any edit on it.

We need to create a new RDP listening port within the registry:

1 – Run Regedit.exe on your Server.

2 – Navigate to the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

3 – Export the entire key to a .REG file by selecting the key “click on it” and going to File – Export.

4 – Give it any name you like (name not important, any name will do).

5 – Edit the .REG file you’ve just created
(Do not double click on the .REG file, instead right click it and choose Edit)
and change the name of the key at the 3rd line of the file to something like:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp-New

6 – Then Find: PortNumber

and change it to whatever port you want. Make sure you write it in hexadecimal format. For example,
for 3390 you must enter D3E (use calculator in scientific mode to easily convert decimal to hexadecimal format).

7 – Import the .REG file back to the registry by double clicking on it, and we are done.

To connect to the Server from the client:

1 – Go to the Start menu and click on Run.
2 – On the Run menu type MSTSC and click Enter.
3 – In the RDP window, in the Computer box, scroll to the computer name or IP to which you wish to connect.

Code Snippet

Add a “:Port” (without the quotes) where “Port” is the decimal value of the destination port.

Another method of connecting to a different port that default is to run the MSTSC command
with the required command line parameters:

Code Snippet

/v:ServerName[:Port]

For example: MSTSC /v:192.168.1.2:3399 (example port)

NOTE: You have to enable (Allow) the port in the firewall of the client operating system

This was originally posted here: https://social.microsoft.com/Forums/en-US/4e7bd341-38d9-42b6-9265-c6952dc3cdc3/add-a-new-rdp-listening-port-howto

Unable to RDP to Virtual Machine: CredSSP Encryption Oracle Remediation

If you get a message like this when you try to RDP:

Then:

  1. Open a Command Prompt window as Administrator.
  2. Run the following command to add a registry value:
    REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2