How to Configure SSH Password Authentication For Amazon EC2 Instance

Share via:

Dear Readers,

In this article, we will see the following Configure SSH Password Authentication For Amazon EC2 Instance .

Steps to Follow :
  1. Logging to AWS Account
  2. Launch Linux Server
  3. Connect to Linux EC2 Instance by Using Putty
  4. Enable SSH Password Authentication
  5. Connect to Linux EC2 Instance with username and password (without keypair)

 

1. Logging to AWS Account

First, we need to AWS Console page by using below link.

https://aws.amazon.com/console/

Click on sign in to Console button.

Logging to aws account

Login using username & password and click on sign in.

Enter to AWS Management Console

We can see the AWS Management Console Dashboard.

Go to Services, under the compute module click EC2 service to open.

2. Launch Linux EC2 Instance

Go to Services, under the compute module click EC2 service to open.

We can launch Linux EC2 Instance by using below link.

How to Launch Linux EC2 Instance

We can see the Linux server has been launched successfully.

3. Connect to Linux EC2 Instance Using Putty

We can connect putty by using below link.

Connect to EC2 Instance Using Putty

4. Enable SSH Password Authentication

Go inside the Linux Server Terminal.

Create Password for root 

Open sshd_config file and change parameter like comment PasswordAuthentication no ,uncomment PasswordAuthentication and comment PermitRootLogin yes.

Note: Keep in ESC mode then type wq! press enter to save and quit.

Restart sshd configuration file

5. Connect to Linux EC2 Instance with username and password (without keypair)

Go to your instance and copy Public IPV4 address.

Go to seachbar and open putty by typing putty on search bar.

Open putty and specify Public IPV4 which was copied.

Specify username “root” and password which was created.

We can see the terminal of Linux server.

We have connected to Linux server by using username and password without having key pair.

As of now we have seen enable password authentication if you want to disable the password authentication we can do following things.

Disable SSH Password Authentication

Go inside the Linux Server Terminal.

Open sshd_config file and change parameter like uncomment PasswordAuthentication no ,comment PasswordAuthentication yes and uncomment PermitRootLogin yes.

Note: Keep in ESC mode then type wq! press enter to save and quit.

Restart sshd configuration file

Now, we need connect to Linux EC2 Instance by using keypair. Because we have disabled password authentication.

 

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTexperts
Linkedin Page : KT EXPERTS

Follow Me
Ramesh’s Linkedin : Ramesh Atchala

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment