How To Setup GUI For Amazon EC2 Ubuntu Linux Instance

After i setup amazon EC2 ubuntu linux server, i can only access it with ssh command. But i really need the GUI interface to browse the ubuntu server easily. After investigate, i finally find below method to enable xserver on amazon EC2 ubuntu linux server, and connect to it with Microsoft remote desktop.

1. Enable GUI Access In Ubuntu Server Side.

My ubuntu server version is 18.04.

  1. Connect to the amazon EC2 ubuntu linux server with ssh command line.
    ssh -i "/Users/.../key.pem" [email protected]
  2. Update ubuntu server.
    sudo apt-get update -y
  3. Install lxde package. This process may take sometime to install a lot of packages.
    sudo apt-get install lxde -y
  4. Install xrdp to allow remote desktop connection.
    sudo apt-get install xrdp -y
  5. Set a password for user ubuntu, this username is the default username when you use Microsoft remote desktop to connect to the ubuntu server.
    sudo passwd ubuntu

2. Change Amazon EC2 Instance Security Group To Allow Remote Desktop Inbound Connection.

  1. Go to amazon EC2 Dashboard console in a web browser.
  2. Click the INSTANCES —> Instances menu item in left. In the right instance list panel, click the link in ubuntu server instance Security Groups column.
    amazon ec2 instances list panel
  3. Then it will open the security group detail page. Click the Inbound tab.
    amazon ec2 instance security group inbound
  4. Click Edit button to open Inbound rule edit dialog.
  5. In the popup dialog, click Add Rule button then select RDP type, the port range number will be set to 3389 automatically.
  6. Input the source ip ( if you want to access this ubuntu server instance from any ip address), click Save button to save the changes.
READ :   How To Enable Copy Paste ( Shared Clipboard ) Between VirtualBox Host And Guest OS

3. Connect To EC2 Ubuntu Server Use Microsoft Remote Desktop.

  1. Open Microsoft remote desktop and add a server.
  2. Input the amazon EC2 ubuntu linux server ip address, then click Add button to add it.
  3. Double click the newly added server to connect to it, input username ubuntu and the password that you configured in section 1 in the popup authorization dialog. Then you can use the ubuntu server with GUI.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.