Skip to content

Instantly share code, notes, and snippets.

View DevBorisElkin's full-sized avatar

Boris DevBorisElkin

View GitHub Profile
@thomaskanzig
thomaskanzig / how-to-add-a-new-key-pair-to-your-exisitng-AWS-ec2-instances.md
Created February 7, 2023 17:49
How to add a new key pair to your exisitng AWS ec2 Instances

How to add a new key pair to your exisitng AWS ec2 Instances

To connect Amazon Ec2 Instances we need a Private Key generated while creating a particular Instance. In case, anyhow you deleted that key pair from your account or for security reasons you want to attach a new key to your Instance, then here is the step-by-step tutorial to perform the same.

1. Open Key Pairs page

Once you log in to your AWS account you will see the AWS Management Console. On the left top side, click on the Service drop Menu to select EC2. As you are on the ec2 Dashboard, scroll down and from the left side select “Key Pairs” and then click on the “Create Key Pair“.

2. Create a new Private SSH ec2 key pair