Can't connect to EC2 instance on Fedora 32

Hey guys,

I’m trying to connect in one of my EC2 instances, but I get the below error:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

It seems that the problem is OpenSSH, but I couldn’t find any solution.

Open SSH version: OpenSSH_8.3p1.
Has anyone else faced this problem? Also, I tried this solution but it didn’t work.

It looks like the server prohibits password authentication.

A couple of things here to remember - the default username is “fedora” and the key you used should be associated with that user. Are you logging in as fedora@<ec2 ip address>

$ ssh davdunc@
davdunc@ Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
$ ssh fedora@
Last login: Wed Jan  6 21:31:36 2021 from

I created this EC2 instance for testing purposes and I haven’t set any password.
Why does it try to connect with a password?
This is how I try to connect:

ssh -i "redis-test.pem"

This EC2 instance is using Amazon Linux 2. According to AWS, the user name should be ec2-user. Am I missing something?