Fingerprint creation with OpenSSH 6.8
I am running a GitLab instance with OpenSSH 6.8:
OpenSSH_6.8p1, OpenSSL 1.0.2a 19 Mar 2015Running ssh-keygen -l yields e.g.:
2048 SHA256:tywD9wGaP/uIXNihLx3eGYXLrn4n6MZV9bWBAB0RKYo imported-openssh-key (RSA)Which is different from the output of OpenSSH 6.6 (different server, different key).
2048 50:b9:f8:94:30:87:03:af:c9:86:99:ec:1c:2e:fc:f4 .ssh/id_rsa (RSA)It seems GitLab cannot cope with the former format (which seems to be new) and reports it cannot generate the fingerprint. Further digging shows there is a new option:
-E fingerprint_hash
Specifies the hash algorithm used when displaying key fingerprints. Valid
options are: ``md5'' and ``sha256''. The default is ``sha256''.So running ssh-keygen -l -E md5 yields:
2048 MD5:2d:24:5d:f8:e0:a0:2d:23:5f:d4:d5:ef:68:95:01:2b imported-openssh-key (RSA)Which at least looks similar to the old format. Maybe there needs to be some handling for this new format? E.g. first check the OpenSSH version and then generate a fingerprint depending on the version?