Skip to content

Instantly share code, notes, and snippets.

@sarfarazahmad89
Last active October 22, 2019 07:25
Show Gist options
  • Save sarfarazahmad89/d07b4794b59017209871ad6e3c597ad7 to your computer and use it in GitHub Desktop.
Save sarfarazahmad89/d07b4794b59017209871ad6e3c597ad7 to your computer and use it in GitHub Desktop.
SSHFP and SSH client logs : how the public key is encoded/hashed
SSHFP records have the following :
[root@host ~]# awk '{print $2}' /etc/ssh/ssh_host_rsa_key.pub | base64 -d | sha1sum -b | sed 's/ .*$//'
30b2296b3907a1a08d9159aa6a5110c49b4b15d0
SSH logs have the following :
[root@host ~]# awk '{print $2}' /etc/ssh/ssh_host_rsa_key.pub | base64 -d | sha1sum -b | sed 's/ .*$//'|xxd -r -p |base64
MLIpazkHoaCNkVmqalEQxJtLFdA=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment