SSH key no longer working

I’m trying to ssh into a container that I had no problems ssh into these past few days. Today, there is an issue. Works fine for every repo except for one.

I have walked through the steps at Debugging with SSH - CircleCI but still have not had luck. I’m still getting permission denied (public key) errors. I’ve ensured the same SSH key that works for github is being passed to circleci but I’m still getting permission denied errors.

I’ve also tried deleting and re-adding the deploy key, but now when I click on “Add Deploy Key” all I get is a console error and no deploy key is ever added to the account. I’ve asked others on my team to try and add a deploy key and they too are having the same console errors.

How can I SSH into a container since my SSH key is not being accepted?

$ ssh -v git@github.com

Output:

$ debug1: Next authentication method: publickey
$ debug1: Offering public key: /Users/eherman/.ssh/id_rsa RSA SHA256:AyXsrxyveYGWQuUCO+HB9toCopRW6WPRWDGfVjM7xbg explicit agent
$ debug1: Server accepts key: /Users/eherman/.ssh/id_rsa RSA SHA256:AyXsrxyveYGWQuUCO+HB9toCopRW6WPRWDGfVjM7xbg explicit agent
$ debug1: Authentication succeeded (publickey).
$ Authenticated to github.com ([140.82.113.4]:22).

CircleCI:

$ ssh -p 64543 44.202.16.70 -i /Users/eherman/.ssh/id_rsa
$ EvanHerman@44.202.16.70: Permission denied (publickey).

So…why?

Gave it time, restarted my comp and everything is fine again. Not sure what happened.

One thing that may help if this happens again is to use

ssh -vv

or
ssh -vvv

The more v’s the more detail you see about the handshaking.

I’ve recently upgraded my linux laptop and noticed that I needed to add -o PubkeyAcceptedAlgorithms=ssh-rsa when ssh’ing into one of the containers. Not sure if it’s related

3 Likes