AWS Tutorial - How to Enable Username & Password Authentication for Amazon Linux EC2 Machine
AWS Tutorial - How to Enable Username & Password Authentication for Amazon Linux EC2 Machine
In this video you will learn how to Enable Username Password Authentication for Amazon Linux EC2 machine How to Configure SSH Password less Login Authentication using SSH keygen on Linux How do I enable my login password? How do I enable SSH authentication? What is the password command in Linux? Set password for user linux
Just follow the steps given in the video. Do let me know in comments if you face any problem ============================
========================== Learn • How to enable username and password authentication on Amazon Linux machine EC2
Terraform playlist - • Terraform Tutorial for beginner
Python-boto3-AWS playlist - • Python-Boto3-AWS
Docker playlist - • Docker Tutorial for beginner
AWS-EC2 playlist - • AWS-EC2
AWS Tutorial playlist - • AWS Tutorial for Beginner
Devops with AWS Playlist - • Devops Tutorial
AWS IAM Playlist - • AWS IAM Policy
AWS-Lambda Playlist - • AWS-Lambda
Python playlist - • Python
Git playlist - • Git Tutorial
===============================================
Thanks for watching! If you like my content, please subscribe.
============================================
WHO AMI I : I am Vicky Seth, a DEVOPS—AWS—CLOUD Engineer, I use my technical background to make videos about technology that help you to grow. Email - trainerdevopsactive@gmail.com
Content
0.08 -> hi youtube family my name is Vicky and in today's
video we are going to learn how to enable password
5.12 -> authentication on amazon linux machine, here we
need to understand one thing when we are creating
10.16 -> a machine on the amazon what will happen is we are
selecting the ami which is provided by the amazon
16.08 -> or you know we can choose the ami which
is provided in the marketplace or which
21.2 -> is provided by some other users so these ami are
already pre-configured we are not installing the
28.16 -> operating system on all those things right
operating system is already installed along
32.08 -> with that some other settings as well so whenever
we are creating a machine password is not enable
37.6 -> for any of the user to log in, we always have to
log in with the key pair so that is the reason
43.12 -> at the time of creation of the machine the last
step is where we need to select the key pair
47.44 -> and when we try to log into the amazon linux
machine we need to log in with the keypair
53.04 -> in this video i will explain you
how you can enable the password
56.88 -> for the user how you can create the user and
how you can enable the password for that user
62.72 -> let's go to the demo here i am in my aws console
and here i have couple of machines which are
69.04 -> already created and these machines are for the
linux let me select one of the machine and let
74.56 -> me login to that machine so let me grab the public
ip of that machine and let me go to my terminal
82.56 -> and i need to go to that location
where i have downloaded my key pair so
91.28 -> this is the default username ec2 dash
user and then the ip address okay
98.32 -> i'm able to log into my machine let's wait for
it to login yes now i'm able to login let's
104.16 -> suppose i need to log in with the password so
first what i need to do is i need to enable the
108.88 -> password for this user for the ec2 user so how
we can enable the password for that we need to
114.8 -> use the command sudo password and then
the username even if we are not going to
119.76 -> give the username it is going to pick
this username but it is good if you
123.52 -> keep the username now it is asking me to enter the
password so here i have entered the password now
129.28 -> let me exit from here and let's try to login with
the password ec2 - user @ whatever the ip address,
140.32 -> now here when i try to log in with the password
it is not going to give me that option to enter
144.48 -> the password and it will come up with the
error message permission deny public key
149.04 -> gss api key index something like this now
how to correct this thing for that what
154.64 -> we need to do is we need to login back to
our machine with the help of the key pair
161.52 -> okay now what we need to do is we need to
go to cd etc ssh folder now here we have
173.68 -> one of the file that is ssh config this is a
configuration file this is very important file
179.6 -> so make sure once you have knowledge on this
file then only you are going to edit this file
184.24 -> it is always good to take a backup of this
file once you know you are going to do some
188.56 -> changes or something let me login to this so
sudo nano sshd config here if i scroll down
204.16 -> here if we look at this thing
password authentication no
207.92 -> so this is something we need to enable so what
we need to do is we need to comment this section
212.72 -> and we need to uncomment this one password
authentication yes let me save this thing
222 -> the second thing which i need to do is
i need to restart the service as well
225.6 -> and which service we need to restart
that is the ssh config so sudo service
232.48 -> sshd restart we are done let
me exit now let me try to login
244.48 -> here i am getting the option to enter the password
so the password was one two three let me enter
249.36 -> that and let me try to log in i'm able to log
in successfully with the password now okay so
257.44 -> this is the way you can enable the password
authentication on your amazon linux machine
263.28 -> i hope you like this video if you like this
video do subscribe my channel thank you