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


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, 2015 at 14:12

1 Answer 1


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .