Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2 instance: Server refused our key

I was working on an amazon ec2 instance for almost a week now.. I installed LAMP on my ubuntu instance then suddenly yesterday, when I try to connect via SSH on putty it gives me an error "Server refused our key" and "No supported authentication methods available (server sent: public key)

enter image description here

I am not sure what is causing this error since i did not change any settings on the aws console and on the instance itself. I was able to ssh before on the server. before I start setting up the server, I assigned an elastic IP to the instance.

like image 691
kimpoy Avatar asked Oct 29 '22 19:10

kimpoy


1 Answers

I am in the process of setting up ubuntu-Wordpress on aws EC2 using a Bitnami AMI. I added SSH-based security in the last installation sted and thus downloaded a .pem private key. Trying to use putty to create a SSH-tunnel I ran into the wellknown putty login problems, both regarding username and private key. I solved them in the following way: 1) username should be "bitnami" (ec2-user is not working) 2) Using puttykey to convert the public SSH-key from .pem to .ppk (as putty demands private key in ppk format) I had to use SSH-1 (RSA) instead of the default parameter. By doing so putty gave perfect connection to the private IP of my EC2 instance. Hope this helps!

like image 73
user253913 Avatar answered Nov 11 '22 11:11

user253913