Skip to content

Instantly share code, notes, and snippets.

@andreswebs
Created April 17, 2021 14:48
Show Gist options
  • Select an option

  • Save andreswebs/26137c6330600d084cf1d94ee733b78e to your computer and use it in GitHub Desktop.

Select an option

Save andreswebs/26137c6330600d084cf1d94ee733b78e to your computer and use it in GitHub Desktop.
RDP Setup for Ubuntu instance on AWS EC2

0. prerequisites

  • create an EC2 instance on AWS with an Ubuntu AMI.

  • allow ingress traffic on port 3389 on the instance security group (this will be used for RDP)

  • connect to it with SSH

  • run the commands below on the instance shell session

1. install xrdp

sudo apt update
sudo apt install -y xrdp
sudo systemctl start xrdp
sudo systemctl enable xrdp

2. install desktop

udo apt install -y xfce4 xfce4-goodies
echo xfce4-session >~/.xsession

3. set a password

(assuming the username is ubuntu)

sudo passwd ubuntu

4. connect using an RDP client

now you can connect to the instance using an RDP client, with the password set on step 3 above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment