Link to home
Start Free TrialLog in
Avatar of ndr-itsolutions
ndr-itsolutions

asked on

Calculate SSH key fingerprint

How can I retrieve \calculate the fingerprint from the public server key that I have in Windows ?

It seems easy to do from Linux, using ssh-keygen, but I don't have access to a Linux VM.

Thanks
Avatar of Darr247
Darr247
Flag of United States of America image

It's not exactly clear what you're asking... you can use ssh-keygen to recalculate the public key if you have the private key (using the -y switch, with the -f switch to specify the private key file's path and filename), but you cannot calculate the private key from the public key.

Otherwise, [re]running ssh-keygen simply generates a new private/public pair; it will not generate the same key set over and over based on, say, a computer's unique characteristics.

So, please clarify.  :)
There exist versions of the OpenSSH package that can be installed and run on Windows.

It exists as a package under Cygwin: openssh

If installing the whole Cygwin environment seems like overkill for your purposes, there are a couple of places where you can get a smaller package that lets you install just the required components. One that I've used is OpenSSH for Windows [mis-software.com], but you might find other possibilities on Sourceforge or elsewhere.

The keygen command you get from these options operates the same way as the one on Linux, so if you know how to do your task on Linux, you could now do it on Windows.
All you need is PuTTYgen to generate SSH keysets in windows. You can get that from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

That's the same site the download link on putty.org points to, by the way.
Avatar of ndr-itsolutions
ndr-itsolutions

ASKER

Hi,

It's not the public key I want to re-generate, I want to check the fingerprint ?

Thanks
Do you want a 32-byte or 40-byte fingerprint?
32-byte

Thanks
I second  jmcg's suggestion about Cygwin.  Cygwin is a "Linux" like environment that runs under Windows.  You install Cygwin and select OpenSSH  and you can use ssh-keygen just like under Linux.
If you're using putty suite (5 programs), you should be able to use puttygen.exe to get the fingerprint from a public host key.  No need to install cygwin unless you need additional linux tools.

There's an example here: https://winscp.net/eng/docs/ui_puttygen
Unless I'm missing something puttygen can only give you the SSH fingerprint if you have access to the private key.

ssh-keygen allows you to get the finger print from the public key only.
ASKER CERTIFIED SOLUTION
Avatar of Darr247
Darr247
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess ndr-itsolutions needs to give us more details of exactly what he wants to do.

Most any ssh client will show you the finger print when you connect to the server.

So ndr-itsolutions, do you have the public key and you want to caclulate the fignerprint, or do you just want to see what it is when you connect?

If you want to see it when you connect, then most any ssh client will show it to you when you connect.