AWS EC2 Remote Desktop

There are two ways to connect to a EC2 machine from your desktop:

  1. NoMachine. Theoretically it should work, but I was not able to figure out. I could not connect via port 4000 even though NXServer was up and running.
  2. LXDE.
    Open Remote Desktop Protocol (RDP) 3389 on Security Group
    SSH to the host
    sudo apt-get update
    sudo apt-get install lxde
    sudo apt-get install lxdm (select LXDM in the pop-up window)
    On Ubuntu 16: 
      sudo /usr/sbin/lxdm & 
    On Ubuntu 14: 
      sudo start lxdm
    sudo apt-get install xrdp
    Set up password for unbuntu: sudo passwd ubuntu (type your password)
    Then use Microsoft Remote Desktop (Mac has one too available in App Store) to connect to the host

One thing I realized is that Virtual Machine does not have graphic card, which means I cannot run TensorFlow for Deep Learning or any software that requires GPU. Luckily Amazon EC2 supports GPU instances with pre-installed NVIDIA drivers now.