0

In my system log, I see a line like this every time I login with SSH. I want to know what the long alphanumeric string at the end means. Is it safe to share this info when posting log files publicly for troubleshooting? I have replaced it here with the same number of x characters.

Jun 18 21:53:50 meye-6155c1c4 auth.info sshd[1416]: Accepted publickey for admin from xxx.xxx.xxx.xxx port 57978 ssh2: RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I am using OpenSSH 7.6p1 and logging in using a public key.

2

It is the SSH fingerprint

For eg:

12:f8:7e:78:61:b4:bf:e2:de:24:15:96:4e:d4:72:53

The fingerprint is used for identifying the server/machine you are connecting to, it is based on the server's Public key.

And yes it is safe to share it, as it is based on public key which is available to all

Explanation:

Fingerprints are unique way of identifying the host you are connecting to, they are a simple representation of Host key

Host keys are normally generated automatically when OpenSSH is first installed or when the computer is first booted. Host keys are usually stored in the /etc/ssh directory, in files starting with ssh_host_<rsa/dsa/ecdsa/ed25519>_key

You can check the host key fingerprint :

$ sudo ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key
2048 SHA256:qEx0sZHQnkl5lOWN7y0geX6e1Y9lxGocluDvHtMgeOM root@197nodnb20354 (RSA)

If the fingerprint changes, the machine you are connecting to has changed their public key (happens from re-installing ssh), but it could also indicate that you are connecting to a different machine at the same domain/IP or that you are being targeted with a man-in-the-middle attack.

| improve this answer | |
  • The hash is of a user's key, not a host key. – Kusalananda Jun 19 '18 at 5:46
  • Please don't use code formatting for terms like "SSH fingerprint" or "OpenSSH" or "public key". If you want to provide emphasis, use italics or bold. meta.stackexchange.com/q/135112/270345 – muru Jun 19 '18 at 5:47
  • @muru thanks for the suggestion, edited my answer and question edits – Arushix Jun 19 '18 at 5:51
  • @Kusalananda thanks for pointing that out, edited my answer to include the suggestion – Arushix Jun 19 '18 at 5:56

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.