I launched an instance & downloaded my secret key. I’ve attempted this on 2 different devices and instances. Im trying to connect to the instance so I can upload files. Whenever I attempt to connect, this permission denied message displays.
Note I’ve downloaded and used openSSH
PS C:WINDOWSsystem32> ssh -i C:Users*Downloads*key.pem @ec2-–––.us-west-2.compute.amazonaws.com
The authenticity of host ‘ec2-–––.us-west-2.compute.amazonaws.com (...)’ can’t be established.
ECDSA key fingerprint is SHA256:.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘ec2-–––.us-west-2.compute.amazonaws.com,...‘ (ECDSA) to the list of known hosts.
*@ec2-–––**.us-west-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
PS C:WINDOWSsystem32>
P.S. This is my first post, so constructive criticism on etiquette is welcome 🙂
Recently started my first job (an internship really) in the IT field. 3 months ago working for a start-up. Im hoping to migrate eventually to something in the field of cloud security, OSINT, DevSecOps, Web Development. Passionate about information security, open source software.
I followed this tutorial from amazon on how to connect to my instance
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/openssh.html
2
Answers
Looks like it’s an issue with .pem file permissions. Check this video & see if you can resolve the error.
You can use puttygen to get ppk file which is helpful to SSH from windows.
If you want to use .pem files, mobaxterm is good software to use
You are very welcome to the community, it’s nice to know you started your first Job!
To get you started on how to connect to the AWS Linux instance there is a nice KB article Connect to your Linux instance from Windows using Windows Subsystem for Linux and another one using
putty
look at here & another SO thread.There are a few thing you need to learn as Prerequisites:
Then use :
OR
From using your Windows CMD:
OR
Better Use mobaexterm and copy user key in there and you will there: