I have a very simple question, I have created an instance with aws AMI. I can log into it using my key. But I want to login using a username and password.
useradd username -p password
This has created the user and password, but when I try to login I get
ssh [email protected]
Permission denied (publickey).
I am on redhat
cat /etc/*release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2018.03
I did some reading and learnt it must be something to do with pam but I failed adding/removing anything.