Connect AWS EC2 instance from windows Remote Desktop
Connect an Ubuntu AWS EC2 instance through Remote desktop
If you are visual person, you might be interested to connect AWS EC2 instance through an UI instead of the boring terminal.
To go straight to the process and connect your AWS EC2 instance with Ubuntu image. Below are the steps should help you to connect over remote desktop from a Windows machine I have tried and established successfully.
Do try the below steps. I assume you are aware of aws console, EC2 instances and Security Groups. Basically, the inbound rules. With that assumption let’s dive into the hands on.
Aws console -> Services -> ec2 -> Instances -> launch instances
Select Ubuntu image for your AMI:
Review and Launch:
Very very important!! Download the keypair to local system before hitting “Launch Instance”
You’ll see something like this:
And
You can see the instance by clicking below “View Instances” directly or through EC2 service in aws console:
Wait for the EC2 instance to spin.
Remember to verify the status checks are completed.
Time to dress up our EC2 with UX now
Step-1) access EC2 instance either through powershell or putty. I use windows Powershell.
Now I am inside EC2.
Now install some UX packages into your EC2 Ubuntu instance to provide the head to the head-less!!
Xrdp : Remote connection protocol
xfce : A nice UX or Windows manager for Ubuntu.
1. sudo apt-get update
2. sudo apt-get install -y xrdp
3. sudo apt-get install -y xfce4
4. sudo apt-get install ubuntu-desktop
5. vi /etc/xrdp/xrdp.ini
e.g. screenshot:
Likewise provide all commands. You are closer to see your desktop!
One important step: Edit Security Group of your EC2 instance so to allow inbound TCP connection on port 3389. This is your RDP port or Remote Desktop Port.
Now confirm from AWS console:
Change the password of your modified EC2 instance to something simple through ‘passwd’ as below :
Now restart xrdp through below command:
service xrdp restart
Copy the public IP of your EC2 instance and provide in Windows -> Remote Desktop Connection as below:
Don’t change the dropdown upon prompted. Just provide username as ‘root’ (without single quote of course) and password the simple password you have just changed.
And Voila!!
You can see your Remote Desktop. Enjoy!