github ssh key的SHA256是什么
怎么知道github上自己的公钥指纹和本地的公钥是否一致?
计算方法如下:
bash
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