Creating an EC2 instance accessible via remote client in AWS

 



Creating an EC2 instance accessible via remote client in AWS


You must have an AWS account. If you don’t have an account, create one.
Note: You will need to provide credit/debit card information for your new account.

To create and launch a Linux EC2 instance to connect to we will create and configure a Linux EC2 instance using an AWS Free Tier option through the following steps


1. In the EC2 Dashboard, click on the Launch Instance button



2 .Choose an Instance Type
If it isn’t preselected, select the t2.micro [Free tier eligible] instance type. Leave the other settings at their default values.

3. Select Create a new key pair from the drop-down menu
The private key file (.pem) will download to your default downloads folder. 



4.Then click Launch Instances.




5. A Launch Status window opens, displaying a notice that “Your instances are now launching.” Click on the instance ID inside the green box to open the EC2 Dashboard and view details of your running instance.




6. Generate a PuTTY Private Key (.ppk) File
Incase you have the private key in .PEM format ,we need to convert it to a .ppk format.

  • Launch and open PuTTyGen ,

 Click the Load button and navigate to the folder that contains the private key file (.pem) .



  • Click on the PuTTY Private Key Files button in the lower-right corner of the window and select All Files .
  • Select your private key file (.pem) and click Open.

In PuTTY Key Generator, make sure Type of key to generate value is set to RSA.

Navigate to the location you want to store your PuTTY Private Key file (.ppk) and give it a name.
Click Save.


Close the PuTTY Key Generator window.


Connect to EC2

Open PuTTY by clicking on the desktop icon or the putty.exe file in the PuTTY folder.
In the Host Name (or IP address) box, enter instance-user-name@public-ipv4 address or also you can use public IPV4 DNS instead.



Note: The Public DNS for your instance is displayed in AWS in the EC2 Management Console Instance Description in the middle of the screen.




Under the Category panel, expand Connection, expand SSH, and then choose Auth.  Click on  Browse. Select the .PPK file that you generated for your key pair and choose open.




If this is the first time you have connected to your Instance, a PuTTY Security Alert will ask you whether to proceed with the connection.
Click Yes to complete the connection.

The EC2 Instance window will appear (black screen below).



Comments