0% found this document useful (0 votes)
125 views

This Script Chmod 400 Yourkey - Pem

To connect to an Ubuntu instance on AWS, you need to: 1. Change the permissions of the .pem key file to read-only for the owner. 2. Paste the connection script from the instance into your local terminal. 3. Install the Ubuntu desktop environment and xrdp using apt-get to enable remote desktop connections. 4. Connect through Putty using the instance public IP and private IP mapped to port 3389.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views

This Script Chmod 400 Yourkey - Pem

To connect to an Ubuntu instance on AWS, you need to: 1. Change the permissions of the .pem key file to read-only for the owner. 2. Paste the connection script from the instance into your local terminal. 3. Install the Ubuntu desktop environment and xrdp using apt-get to enable remote desktop connections. 4. Connect through Putty using the instance public IP and private IP mapped to port 3389.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

To connect to an Ubuntu Instance we need the script given by AWS instance, we also need to

Change the .pem file permissions to set read-only permissions to the owner of the file, remove
any permission to group and other. Otherwise ssh will refuse this key for use. Be familiar with
this script
chmod 400 yourkey.pem

the script in arrow is the scrip you have to copy, highlight and copy the script
locate your .pem file usually its in your download because you just downloaded it, then
if your .pem file is there then right click to an empty screen and click open terminal

after you click terminal you will see this, there you will paste your script copied
something looks like this “chmod 400 yourkey.pem”
You paste the script you copied in the Instance that looks like “chmod 400
yourkey.pem” then press enter then you will see in the download folder that your.pem
file having something like a lock symbol and and your now ready to connect to your
server.
Go back to you browser with your AWS Instance just do not close anything just
minimize it and copy the example script in there if that is really your instance and you
click connect and that will show the exact script in example they had given, highlight it
and copy.
Paste the example script to your terminal that we had enter our script earlier
and press enter

and you will be login to remote server and looks something like this and there you are
now connected and ready to install the Ubuntu gui.
Installing Ubuntu Gui.

Since AWS ubuntu server has no gui we cannot use it just like a noramal computer we
been use to, we have to install a gui to it will have desktop environment like we
expected, So to start look at the picture below type the script sudo apt update and
press enter, and after that type sudo apt-get update and enter.

and after that type sudo apt-get update and enter.


And now we will be installing the ubuntu desktop you will be typing or just copy this
script in your terminal sudo apt-get install gnome-shell ubuntu-gnome-
desktop

a process will be showing like hundreds of running txt and some questions will come out
just type Y or yes
and the installing take long showing thousands of txt maybe 2 to 5 minute it depends on
the speed of instance you choose, and after it will look like this.
And now we are gonna install xrdp we will using this script below

sudo apt-get install -y xrdp


Then type sudo passwd ubuntu and type ubuntu on password so you will not forget
it, just change it later after you succeed on this lesson. Just take look at the pictures
below.
Then type sudo reboot
Next is using Putty to connect to you Server
After you type sudo reboot your terminal will be disconnected and now we will
connect again using Putty, and lets assume you already have installed putty, and if not go
back to how to install putty section.

Open your putty application


Open up your putty and open also your browser with you instance in it because
you will gonna copy some IP address from an instance to your putty
Highlight and copy the public IP address of your instance and paste it to session of
puttty see arrows below
Click SSH, click Auth and browse your .ppk file

Click open once you already found and click your .ppk file
Click into tunnels

copy Private IP from you Instance just see picture below it has an arrow key
iput 8888 to source port and add at the end of private IP a :3389
Click on Session, type on saved sessions if you like, then click open

And this one will show now type ubuntu and click enter
And you are now connected to server

Open the KRDC app if you dont locate how to install Krdc section
Type 127.0.0.1:888 and choose rdp the press enter

Click ok when this one come out


Type ubuntu in password or whatever password you had made

Type ubuntu again your now in remote ubuntu desktop


you have now ubuntu remote desktop clic full screen if you like

full screen

You might also like