In this article, we will go through the steps for connecting to a simple Linux server in Amazon Web Cloud service
We have seen in the previous article<link> on how to create an Amazon Web Service Linux Server
Steps to connect to AWS EC2 Linux Instance:
Step 1: Login to the Amazon console, using username/password created in the previous article
From the services Menu, select Compute -> EC2 Submenu
Step 2: Once EC2 dashboard is displayed, you will find a table listing EC2 instances
The Linux instance created in the previous article will also be seen here
If the instance is in ‘Stop State’ as shown in the image above, it will not have a public IP address assigned to it
Step 3: In order to connect to this Linux instance, first we need to start the server up
Right click on the server instance and select Instance State –> Start
When the server reaches the ‘Running state’ it will get a public IP address assigned to it.
We will wait till the ‘Status Check’ is complete
Step 4: In the previous article, before launching the Linux instance, we have created a key pair named “testserver.pem”
We need this key pair to connect to the Linux instance. Since, key is in .pem format, first we need to change it to .ppk format
For that we need PuttyGen tool
Open PuttyGen tool and Load the previously saved key
Traverse to the .pem file stored previously and select it
Note: Remember to change the filter from ‘.ppk’ to ‘All files’
If selected file is imported correctly, you will receive a popup message as below
Click on the ‘Save private key’ button and save the .ppk file on your machine. A popup message will be seen asking if you want to save the key without a passphrase
Click Yes
Save the file in .ppk format
Step5: Open a putty terminal and go to the Session pane suing the left hand side options
In the Host Name (or IP address) textbox, enter public IP address of the Linux server created in the previous article
Now go to the SSH-> Auth pane using the Left hand side options
Using the ‘Browse’ button traverse to the location where the newly created .ppk key file is saved
Select the key file ‘testServerKey.ppk’ and return back to the Session pane
Now Press the ‘Open’ button on the Session Pane
You will receive a message informing that server host key is not cached in your registry
Additionally it will also display the fingerprint of the key. Press ‘Yes’ button
It will be prompt to enter the user name. Enter ‘ec2-user’ which is the default user for newly created Linux server in AWS cloud
Press enter and you will be logged into the Linux server successfully
Happy Reading !!
Happy Learning !!