If you may get an error Permission Denied Public key while login into Amazon EC2 server, 

By default can be login into server using .pem key file,

$ ssh -i yourkey.pem  ubuntu@ec2-192-15-0-10.compute-1.amazonaws.com

then, you should be able to change the ssh configuration, If you get Ubuntu server typically in /etc/ssh/sshd_config or /etc/sshd/sshd_config

Open a ssh configure file by text editor,

$ sudo vim /etc/ssh/sshd_config

PasswordAuthentication no

Change to 

PasswordAuthentication yes

Once you have configured the ssh restart that service,

$ sudo service ssh restart

Create a user name and set password,

$ sudo adduser username 

Now, Login your server in Terminal or Putty 

$ sudo ssh -p 22  username@