SSH into your Amazon instance without a KeyPair
1. SSH into your instance.
2. Edit /etc/ssh/sshd_config and set PasswordAuthentication to yes.
One way to do this is to enter the command nano /etc/ssh/sshd_config, then scroll down toPasswordAuthentication. Change the no to yes. Then press Ctrl+X, and press the Y key to save and quit.
3. Enter the command /etc/init.d/sshd reload. (for Ubuntu, enter the command reload ssh)
4. Set your password if you haven’t already, with the passwd command.
Note: This was tested with SUSE Linux. Directory and file names may be slightly different depending on your flavor of Linux.