What is the Compute resources? How to create an EC2 Instance and download the PEM file to generate the PPK (key pair) from it?
Tags: ec2, aws, cloud, beginners
Published: 2022-11-21 12:26:14

# 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwnj7azufwh0n9ifusng.jpg)

### Step 3
- In the **AMI** section, search for **Amzon Linux** and choose it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ss4tjs0wntwgr7br5ux6.jpg)

### Step 4
- In the Key pair section, click on **Create new key pair**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o18a237jclwvo1n7d56l.jpg)

- 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dyambk00erdi1q2xuo5g.png)

### Step 5
- In the **Network settings** section, make sure you ticked **Allow SSH traffic from**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xv43cc6u4eu0ds25e1h6.jpg)

### 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/td5kt5thy7r0u2qoab16.png)
<br><br><br>
#### ----------- You rock 👏🏼👏🏼👏🏼💛💚💙 -----------
Now, before I finish this, we'll generate the PPK file from PEM file.
Let's go...
<br><br><br>
# 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](https://the.earth.li/~sgtatham/putty/latest/w32/puttygen.exe
).
- 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vohlhdavxe57wvy3r34q.png)

### 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.

<br><br><br>.
#### ----------- Hats off 👏🏼👏🏼👏🏼💛💚💙 -----------
Now you are ready to use PuTTY for connecting to the running Linux instance created in a previous Lab Step.
<br>The PuTTY SSH client will use the key pair format it requires for the private key to connect to the instance.
<br>The running Linux instance already has the public key on it.
<br>We'll do this in the next post.
Have a good day, pal. ^_^


[GitHub](https://github.com/a00ayad00)
[LinkedIn](https://www.linkedin.com/in/a00ayad00/)
[Facebook](https://m.facebook.com/a00ayad00
)