EC2 config to not use pem file and use ssh key instead Open sshd_config file sudo vi /etc/ssh/sshd_config Look for PasswordAuthentication No and change it to PasswordAuthentication Yes Save the file Restart ssh demon sudo /etc/init.d/ssh restart Try connecting to check if it works