Skip to content

Instantly share code, notes, and snippets.

@iSkore
Last active March 1, 2016 16:07
Show Gist options
  • Save iSkore/5145b105c85bbee00aec to your computer and use it in GitHub Desktop.
Save iSkore/5145b105c85bbee00aec to your computer and use it in GitHub Desktop.
RDP into Ubuntu EC2

This tutorial is for setting up an Ubuntu EC2 for RDP

In this tutorial, I will be using nano for this. To exit and save, do CTRL-X followed by Y and ENTER

  1. Boot up EC2 - Ubuntu 14.04 (LTS)

  2. Once the instance is all boot up, update it:
    sudo apt-get update
    sudo apt-get upgrade

  3. sudo nano /etc/ssh/sshd_config

  4. Change PasswordAuthentication no to PasswordAuthentication yes

  5. Restart SSH: sudo /etc/init.d/ssh restart OR sudo /etc/init.d/sshd restart

  6. Go into root: sudo -i

  7. Set password for ubuntu: passwd ubuntu

  8. Once you've finished setting your password, go back to ubuntu user: su ubuntu & cd

  9. Install Ubuntu desktop functionality:
    export DEBIAN_FRONTEND=noninteractive
    sudo -E apt-get update
    sudo -E apt-get install -y ubuntu-desktop

  10. Install XRDP and XFCE4: sudo apt-get install xfce4 xrdp sudo apt-get install xfce4 xfce4-goodies

  11. Make XFCE4 the default for RDP connections: echo xfce4-session > ~/.xsession

  12. Copy .xsession to the /etc/skel folder so xfce4 is set as the default window manager for any new user accounts that are created. sudo cp /home/ubuntu/.xsession /etc/skel

  13. Allow host port to connect to xrdp.ini: sudo nano /etc/xrdp/xrdp.ini

  14. Change port=-1 to port=ask-1

  15. Restart xrdp: sudo service xrdp restart

  16. Go back to AWS and make sure your security group includes inbound access to RDP 3389

  17. Go into Microsoft Remote Desktop, type in your IP address with: XX.XX.XXX.XX:3389

Check this link - and this Untested but Solutions to 14.x to 15.x: ... to be continued

sudo do apt-get update

sudo apt-get dist-upgrade

sudo do-release-upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment