jemz
November 2, 2019, 1:45pm
1
Hi I created keypair in EC2 instance and dowloaded it and save it my directory, when I ssh
ssh -i "C:\Users\myuser\.ssh\Myawskeypair.pem" ubuntu@ip.compute-1.amazonaws.com
I get permission denied. I just followed the docs when I Launch the instance.
I don’t know how to fix.
Thank you in advance.
rpkamp
November 2, 2019, 1:47pm
2
Is ec2-ubuntu
the username you were logged in as when you created the key pair?
Are you sure youve downloaded the private key and not the public key?
jemz
November 2, 2019, 1:51pm
3
sorry I change now it is ubuntu as username, yes I downloaded the private key
rpkamp
November 2, 2019, 2:02pm
4
So does it work now with the correct username?
jemz
November 2, 2019, 2:05pm
5
Nope still having problem. I tried also root but no luck
rpkamp
November 2, 2019, 2:07pm
6
Well there is a user that you were logged in as when you crated the key. That’s the user you need to use to log in to the machine, because the key is bound to that user. You cannot use the key to log in with other usernames.
jemz
November 2, 2019, 2:14pm
7
Even I used the connect button in the instance dashboard this is the error
There was a problem setting up the instance connection
Log in failed. If this instance has just started up, try again in a minute or two.
system
Closed
February 1, 2020, 9:35pm
9
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.