• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

EC2 Password Authentication

May 18, 2020

When you stand up an AWS instance, it’s only accessible via SSH key using the default user, typically ec2-user.

Add password to ec2-user, then enable password authentication to ‘yes’ in SSH.

# Add password to ec2-user
sudo passwd ec2-user
# edit ssh config
vim /etc/ssh/sshd_config
# enable password authentication
PasswordAuthentication yes
# save file and exit

# Add password to ec2-user sudo passwd ec2-user # edit ssh config vim /etc/ssh/sshd_config # enable password authentication PasswordAuthentication yes # save file and exit

Restart SSH service.

systemctl restart sshd.service

systemctl restart sshd.service

Filed Under: Cloud, Linux Tagged With: authentication, aws, ec2, keys, password, ssh

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023