Wednesday, November 3, 2021

How to Login AWS EC2 instance without using (.ppk or PEM key) Key Pair

Pre-Requisite: 1. You need to have  AWS Console account 

                         2. We have EC2 instance created if not How to Create an EC2 instance

Step 1: Copy Public IPAddress of an EC2 instance from AWS Console 

Step 2: Launch Putty and paste the IP Address and  Select "Auth" from SSH under category and browse for ".ppk" and click on Open 

Step 3: Click on "Yes" to Accept the trust connection with EC2 instance from host
Step 4: Login with "ec2-user" details 
Step 5: Setup the password for "root" user account 
Step 6:  Navigate to sshd_config using sudo vi /etc/ssh/sshd_config and  change the values to following properties 
                6.1 PasswordAuthentication Yes (default value is No)
                6.2 PermitRootLogin yes (Remove the # )

Press "Esc" or "ctrl+c" from keyboard then type ":wq!" to Save and exit from the file 

Step 7: Restart the sshd service 

               systemctl restart sshd.service (To Apply the modified changes)
               systemctl status sshd.service (To Check the sshd running status)

Step 8: Now Launch new Putty / terminal to access the Linux Instance machine and login with root user by entering the password




We have logged in AWS EC2 instance successfully !!! without using keypair


             






 









No comments:

Post a Comment

How to install and setup Kubernetes cluster using kOps in AWS environment

  Kops: Kops is also known as Kubernetes Operations, it is an open-source project which helps you to create, upgrade, destroy, and maintain ...