EC2 Instance keypair no longer working after SSH Key created for Github

28 views Asked by At

I created a keypair with the EC2 instance which I have been using to connect and transfer files successfully. Recently, I needed to generate an SSH Key on the instance for Github permissions and now, the keypair that I created no longer seems to be working. When trying to send a jar file to the instance I am getting the below error:

[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
lost connection

I'm not sure how to proceed.

I tried:

chmod 0700 ~/.ssh
chmod 0600 ~/.ssh/authorized_keys

Also added the SSH key from my terminal ed25519 to authorized keys on ec2.

Nothing changed.

0

There are 0 answers