DEV Community

Cover image for What is the Compute resources? How to create an EC2 Instance and download the PEM file to generate the PPK (key pair) from it?

What is the Compute resources? How to create an EC2 Instance and download the PEM file to generate the PPK (key pair) from it?

Overview

In this post, I'll

  • explain what is the compute resources means.
  • create an EC2 Instance.
  • download a PEM key through which we will generate a public/private key pair (PPK) to access the instance from our local system.
  • In the next post, I'll explain the ssh tunnel and we'll use it to establish a connection to the EC2 instance (Remote server) from our system (local server) using the PPK file (public/private key pair)

What are the compute resources?

  • Simply, Compute resources can be considered the brains and processing power required by applications and systems to perform computational tasks via a series of instructions.
  • So essentially Compute is closely related to common server components, which many of you will already be familiar with, such as CPUs and RAM.
  • Keep in mind, a physical server within a data center would be considered a compute resource, as it may have multiple CPUs and many gigs of RAM to process instructions given by the operating system and applications.

Create an EC2 instance and download PEM key file

Step 1, 2

  • Go to your AWS console and search for EC2 and navigate to instances.
  • Choose Launch instances

Image description

Step 3

  • In the AMI section, search for Amzon Linux and choose it.

Image description

Step 4

  • In the Key pair section, click on Create new key pair.

Image description

  • choose a name for the Key pair (I chose Ayad_KP).
  • Keep the default value for Key pair type and Private key file format, and click Create key pair.
  • The key pair will begin downloading your PEM file (here in my case the file named Ayad_KP.pem) on your local system. It contains a private key that you can use to connect to the EC2 instance via SSH.

Image description

Step 5

  • In the Network settings section, make sure you ticked Allow SSH traffic from

Image description

Step 6

  • Go with your heart If you want to modify the other settings.
  • Launch the EC2 instance
  • Go to the instances console again and wait till the Status check to be 2/2 checks passed.

Image description



----------- You rock 👏🏼👏🏼👏🏼💛💚💙 -----------

Now, before I finish this, we'll generate the PPK file from PEM file.
Let's go...



Create the PPK (public/private key pair) file from PEM file

Step 1

  • We we'll use PuTTYgen app for this.
  • So, If you do not already have PuTTYgen, download it from the following link: PuTTYgen.
  • After you download PuTTYgen, start it (no installation is required).

Step 2

  • Click Load and browse to the location of the private key file that you want to convert (for example Ayad_KP.pem).
  • By default, PuTTYgen displays only files with a .ppk extension. - You'll need to change the drop-down adjacent to File name to All Files in order to see your PEM file

Step 3

  • Select your .pem key file and click Open. PuTTYgen displays the following message:

Image description

Step 4

Click OK. PuTTYgen displays a dialog with information about the key you loaded, including the public key and the fingerprint.

Step 5

  • Click Save private key to save the key in PuTTY's format.
  • Do NOT select a passphrase. (Additional security is not required.)
  • Be sure to save your private key somewhere secure.




.

----------- Hats off 👏🏼👏🏼👏🏼💛💚💙 -----------

Now you are ready to use PuTTY for connecting to the running Linux instance created in a previous Lab Step.

The PuTTY SSH client will use the key pair format it requires for the private key to connect to the instance.

The running Linux instance already has the public key on it.

We'll do this in the next post.
Have a good day, pal. ^_^

GitHub
LinkedIn
Facebook

Top comments (0)