Open In App

How To a Create a Key Pairs in AWS-EC2?

Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisite: AWS

In Amazon Web Services, an EC2 key pair consists of a public key and a private key that is used to securely communicate with EC2 instances. The public key is stored on the EC2 instance and is used to encrypt messages that can only be decrypted by the corresponding private key, which is kept by the user who generated the key pair. The private key is used to decrypt messages that have been encrypted with the public key. When launching an EC2 instance, you have the option to specify a key pair that will be used to encrypt login information and authenticate connections to the instance. If you do not specify a key pair when launching an instance, you will not be able to access it without additional steps, such as creating a new key pair or using an existing one.

We can create a Key Pair with two methods:

  1. When we are launching an EC2 Instance 
  2. We can also create a only Key Pair separately.

Steps to Create a Keypair

Step 1: Click on the EC2 

AWS console

 

Step 2: Scroll Down and Click on the Kay Pairs in Network & Security.

Select keypairs

 

Step 3: Click on the Create Key Pair Button.

Create key pair

 

Step 4: Type a Key Pair name.

  • Key Pair type – RSA
  • Private key file format – .ppk
  • Tag (Optional) – keys
Key pair type

 

Step 5: Click on the Key Pair Button.

Key pair file format

 

Step 6: In Download Section you will see the file is in the Downloading process.

Download the key pair

 

Step 7: In Key Pair Section you will see the Key pair is created.

New key pair

 

Now you can use it key pair when you will launch the any EC2 Instance or Access the Instance.


Last Updated : 28 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads