how to enable direct ssh to EC2 linux instance without keypair file
To enable the direct ssh to linux EC2 instance without using keypair file we have to edit the sshd_config file.
Follow the given below steps
Step 1 : Login into linux EC2 instance with the help of keypair. Use the user name which is related to your instance. for eg.
ssh -i keypar_file.pem [email protected]1.1.1.compute-1.amazonaws.com
Step 2: After login ,edit the /etc/ssh/sshd_config file and make the value of parameter called PasswordAuthentication as yes
change the PasswordAuthentication value as yes
save and exit
Step 3: Restart the ssh service.
In Debian or Ubuntu instance:
In CentOS or Red Hat instance:
Step 4: Open new terminal in your PC or laptop. ( Do not take the risk :),playing safe side )
Now try direct ssh without using keypair file.