2

I have a SSH2 public key with a .PUB extension and when viewed in notepad it has this header:

 ---- BEGIN SSH2 PUBLIC KEY ----

How do I view the thumbprint of this key?

I've attempted ssh-keygen -lf key.pub but that returns: "Is not a valid key file". (I got the binaries for ssh-keygen from github's standard shell.

I'm a bit new to SSH/SSH2 and not sure what the difference is, or if I'm using the wrong version of a tool for the wrong version of a public key.

  • Are you using Git Bash? What line-endings does the file have? – Ohnana Mar 18 '15 at 14:12
2

It looks like you made your key with the PuTTY Key Generator (PuTTYgen). To get the OpenSSH pubkey format, edit it with PuTTYgen (right click on the .ppk file and click on "edit").

At the top of the window, you'll see the "Public key for pasting into OpenSSH authorized_keys file" text box. The text should start with ssh-rsa AAA (assuming an RSA key). Copy that text and save it as your public key. This is what you need. You'll also find your key fingerprint in here.

Here's a screen shot of what I'm describing: PuTTYgen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.