Logging to a Linux EC2 using username/password combination

0 votes
By default Linux EC2 uses KeyPair for authentication, so how do I login using a username/password combination to log in to EC2.
Aug 23 in AWS by Saraswati
26 views

1 answer to this question.

0 votes

By default in a Linux EC2, allows authentication using a KeyPair, so use a KeyPair to login to the EC2 instance and then follow the below steps:

Step 1: Run the below command from the EC2 Linux prompt to add user praveen

sudo adduser praveen

Step 2: In the /etc/ssh/sshd_config set the property PasswordAuthentication to yes from no. This has to be done as a sudo (administrator).

Step 3: As the ssh configuration file has been changed, restart the sshd daemon using the below command.

sudo service sshd restart
answered Aug 23 by Praveen
• 700 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Connecting to an EC2 in a Private Subnet

An EC2 created in the Private Subnet ...READ MORE

answered Aug 23 in AWS by Praveen
• 700 points
20 views
0 votes
1 answer