Remote Desktop on an Ubuntu EC2 Instance (2024)

A couple of options for remote access to desktop applications on a EC2 host.

Option 1: SSH with X11 Forwarding

  1. Connect to the EC2 host using SSH with X11 forwarding enabled.
ssh -X 13.57.185.127
  1. In the resulting session you should find that the DISPLAY environment variable is set.
echo $DISPLAY

With this in place you can launch an application on the remote host and it will show up on your local desktop. Try starting gvim (assuming that you have it installed).

Option 2: Remote Desktop

  1. Connect via SSH.
  2. Install a few packages.
sudo apt updatesudo apt install -y ubuntu-desktop xrdp
  1. Edit the RDP configuration file, /etc/xrdp/xrdp.ini, on the host. Note the entry for port, which will be important for making a connection. A minimal configuration might look like this:
[globals]bitmap_cache=yesbitmap_compression=yesport=3389crypt_level=lowchannel_code=1max_bpp=24[xrdp1]name=sesman-Xvnclib=libvnc.sousername=askpassword=askip=127.0.0.1port=ask-1

💡 Setting crypt_level to none will help to make the remote session more responsive.

  1. In the AWS Dashboard edit the Security Group for the EC2 instance and allow inbound TCP connections on port 3389.
  2. Restart RDP.
sudo service xrdp restart
  1. Choose the Window Manager for RDP connections. This involves changing the contents of a user’s .xsession file. You can copy the modified .xsession into /etc/skel/ so that it will be propagated into any newly created accounts. However, you’ll need to copy it manually into existing accounts.

Select one of the Window Manager options below (there are certainly other options too!).

sudo apt-get install -y xfce4 xfce4-goodiesecho xfce4-session >~/.xsession
  • Unity
echo unity >~/.xsession

You’re ready to connect!

Connecting via RDP

  • On a Linux machine, connect using vinagre. You’ll need to specify the IP address for the EC2 host and the RDP port.

<img src=“vinagre-login.png alt=“The vinagre login dialog.">

A connection will be initiated and you’ll be prompted to provide your password. Leave the port unchanged.

<img src=“remote-desktop-login.png alt=“The xrdp login dialog.">

Once you’re authenticated you should see your desktop.

<img src=“remote-desktop.png alt=“The remote desktop.">

  • On a Windows machine use the Remote Desktop client.
Remote Desktop on an Ubuntu EC2 Instance (2024)

FAQs

Can you rdp into EC2? ›

How to connect EC2 using RDP. Go to EC2>Instances>Launch an Instance. Type 'Windows' as an instance name, and then select Windows as an Amazon Machine Image (AMI).

How to enable RDP on AWS Ubuntu? ›

To allow RDP access

Open the Amazon EC2 console , set it to the stack's region, and choose Security Groups from the navigation pane. Choose AWS-OpsWorks-RDP-Server, choose the Inbound tab, and choose Edit. Choose Add Rule and specify the following settings: Type – RDP.

Why am I unable to connect to my EC2 instance? ›

The following are common reasons why EC2 Instance Connect might not work as expected: EC2 Instance Connect doesn't support the OS distribution. The EC2 Instance Connect package isn't installed on the instance. There are missing or incorrect AWS Identity and Access Management (IAM) policies or permissions.

Why will my remote desktop not connect? ›

One reason for connection problems and other typical errors like 'remote desktop services is currently busy' can be an unstable internet connection. Also, the wrong credentials often cause lead to the remote desktop not being able to connect correctly.

What port does RDP run on? ›

Remote Desktop Protocol (RDP) is a Microsoft proprietary protocol that enables remote connections to other computers, typically over TCP port 3389.

What is the difference between ec2 instance connect and session manager? ›

There many nuanced differences between these services but the basic idea is that EC2 Instance Connect allows for a convenient and secure native SSH connection using short-lived keys while Session Manager permits an SSH connection tunneled over a proxy connection.

What is ec2 instance connect endpoint? ›

Amazon EC2 Instance Connect Endpoint (EIC Endpoint) allows a secure connection to the instances in a private subnet from the internet. It does not require a bastion host, internet gateway in VPC, a public IP address on the resource, or even any agent to connect to the resource.

Does RDS run on EC2? ›

Amazon RDS automatically sets up your related network settings to enable a secure connection between the selected EC2 instance and the RDS database. This connectivity automation improves productivity for new users and application developers.

Can you use RDP to connect to a Linux machine? ›

Anyone with authorized access to a CSL managed Linux computer can connect remotely using an RDP (Remote Desktop Protocol) client.

Do EC2 instances have internet access? ›

An internet gateway enables resources in your public subnets (such as EC2 instances) to connect to the internet if the resource has a public IPv4 address or an IPv6 address.

Top Articles
How to Calculate Savings Account Interest | Capital One
Simple Interest vs. Compound Interest: What's the Difference?
Radikale Landküche am Landgut Schönwalde
Phcs Medishare Provider Portal
New Slayer Boss - The Araxyte
Teenbeautyfitness
Lost Ark Thar Rapport Unlock
Miles City Montana Craigslist
Kent And Pelczar Obituaries
What Happened To Father Anthony Mary Ewtn
Zoebaby222
Delectable Birthday Dyes
Raid Guides - Hardstuck
Meritas Health Patient Portal
The ULTIMATE 2023 Sedona Vortex Guide
I Touch and Day Spa II
7543460065
Telegram Scat
Dallas Cowboys On Sirius Xm Radio
Aberration Surface Entrances
Vermont Craigs List
Harem In Another World F95
Me Cojo A Mama Borracha
Missed Connections Dayton Ohio
Army Oubs
Persona 4 Golden Taotie Fusion Calculator
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Somewhere In Queens Showtimes Near The Maple Theater
How to Grow and Care for Four O'Clock Plants
University Of Michigan Paging System
6892697335
Snohomish Hairmasters
Orange Park Dog Racing Results
Ups Drop Off Newton Ks
950 Sqft 2 BHK Villa for sale in Devi Redhills Sirinium | Red Hills, Chennai | Property ID - 15334774
Craigslist West Seneca
Terrier Hockey Blog
RALEY MEDICAL | Oklahoma Department of Rehabilitation Services
Rage Of Harrogath Bugged
Culvers Lyons Flavor Of The Day
159R Bus Schedule Pdf
Timberwolves Point Guard History
Сталь aisi 310s российский аналог
Walmart Pharmacy Hours: What Time Does The Pharmacy Open and Close?
2024-09-13 | Iveda Solutions, Inc. Announces Reverse Stock Split to be Effective September 17, 2024; Publicly Traded Warrant Adjustment | NDAQ:IVDA | Press Release
Silicone Spray Advance Auto
Here's Everything You Need to Know About Baby Ariel
Haunted Mansion Showtimes Near Millstone 14
Electronics coupons, offers & promotions | The Los Angeles Times
Famous Dave's BBQ Catering, BBQ Catering Packages, Handcrafted Catering, Famous Dave's | Famous Dave's BBQ Restaurant
E. 81 St. Deli Menu
Latest Posts
Article information

Author: Duane Harber

Last Updated:

Views: 5953

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.