You can use user-data to set a password for the user. When launching an instance you’ll paste this into the user-data:
#cloud-config ssh_pwauth: True disable_root: false chpasswd: list: | user:password expire: false
ssh_pwauth will turn on the ability to use password auth. disable_root will enable the root user. chpassword will setup a password for the user.
It’s not recommended to use this regularly. You should use this for testing. Otherwise you should be using the user + ssh-key.
This will allow you to SSH with a password. It didn’t work on Debian as the options were different in the sshd config, but should work with CentOS.