2120 shaares
Generate the hash:
(make sure you have only one line/type, so either delete all others in key.pub or run ssh-keyscan -t rsa example.org > key.pub)
- ssh-keygen -l -f key.pub (default hash, depending on OpenSSH version)
- ssh-keygen -l -f key.pub -E md5 (md5 on current OpenSSH)
- awk '{print $2}' ssh_host_rsa_key.pub | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64 (sha256 on old OpenSSH)
(You might need to start the line with awk '{print $3}' for newer versions of ssh-keyscan because the format changed)