Skip to content
Ricky
English

Search

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

What is the SHA256 that comes on the sshd entry in auth.log?

  • Ricky Lin
  • 1 minute

ssh-keygen -lf .ssh/id_rsa.pub

cat .ssh/id_rsa.pub    |
    awk '{ print $2 }' | # Only the actual key data without prefix or comments
    base64 -d          | # decode as base64
    sha256sum          | # SHA256 hash (returns hex)
    awk '{ print $1 }' | # only the hex data
    xxd -r -p          | # hex to bytes
    base64               # encode as base64