ed25519 fingerprint mismatch because of extra padding from AWS `=`

1

Hello. I'm encountering an interesting scenario where the generated fingerprint for my imported/created ed25519 SSH key is different from the one reported by ssh-keygen.

For example:

ssh-keygen:

64OuseEfObM7yYiEyK7u42qN1kHj6/JGnpro1XqO4pM

And AWS generated the fingerprint:

64OuseEfObM7yYiEyK7u42qN1kHj6/JGnpro1XqO4pM=

So, there is extra padding for some reason. Does anyone know why that is so?

Cheers, Gergely.

Gergely
질문됨 2년 전323회 조회
2개 답변
1

I got it.

From other posts here as well, but the answer is that they are using a base64 sha256 openssl combo like this:

$ cat ~/.ssh/ec2-key.pub | base64 -w0 -d | openssl dgst -binary -sha256 | base64 -w0; echo

Where the pub key was generated from the downloaded ec2 pem key like this:

ssh-keygen -y -f ~/.ssh/ec2-key.pem > ~/.ssh/ec2-key.pub
Gergely
답변함 2년 전
0

As per this page the equal sign at the end is padding to ensure correct Base64 encoding.

profile pictureAWS
전문가
답변함 2년 전
  • Yeah, I know WHAT the equal sign is. :) The question is, why it's there when local workflow doesn't produce it. But I figured it out in the end.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠