Learn how to connect to an AWS EC2 instance using SSH.

1. Go to AWS EC2 service > Instances > Select your instance and click on connect.

Connect AWS EC2 Instance using SSH

2. Click on SSH client.

Connect AWS EC2 Instance using SSH

3. Copy the command mentioned in the Example and save it. We will use it later.

Here, MyEC2InstanceKey.pem, Is the key used to launch this instance, and ec2-user is the default user to connect this instance

4. Now, Open an SSH client

5. Locate your private key file in the command shell, paste the command we copied in step 3, and press Enter.

Connect AWS EC2 Instance using SSH

6. Below message will be prompt, type yes and press Enter.

Connect AWS EC2 Instance using SSH

7. You will get the below message once the instance is connected successfully.

Connect AWS EC2 Instance using SSH

Happy Learning :)