how to ssh EC2 amazon instance from Ubuntu machine

Summary: Most of the new users on AWS amazon have difficulty to ssh EC2 amazon instance from local system. Normally we access the vps or dedicated server through IP address. AWS amazon using the host name of the instance to accessible through ssh. I tried to explain how one can access an EC2 instance from Ubuntu machine.

First of all you have to download your private key to your pc.

If you have the private key file of your amazon instance then its very easy to connect through ssh.

If you don’t have the keys then login to your amazon interface instance interface and create the key instance.pem and instance.ppk

When you create the keys then download it into you system and saved it.

One key .pem is used for linux connectivity and .ppk is used for windows putty connectivity.

In Ubuntu OS open your terminal and get the sudo rights.

Alt+Ctrl+T then type the command

sudo -s
your password:

Go to your download folder and copy the keys to /home/yourname/.shh/ folder

cd /home/myname/Download/

cp instance.pem instance.ppk /home/myname/.shh

Find your your amazon host name like bitnami and type the command in terminal

shh -i instance.pem

You will get connected.

If there is an error of permission denied due to public key, which is open to others, you should have to change the permission of the key file .pemĀ  to 600.

chmod 600 instance.pem

Again try to connect to server instance.This time you will be connected successfully, if you have right usernam and .pem key.

If you need technical assistance for your AWS server management don’t hesitate to contact us for suggestion and advices.

Just send your query through contact us page from our official website.

Leave a Reply

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