Last active
November 16, 2023 18:33
-
-
Save TerryGeng/e43e0f98e5937eece8c49e7e5705437f to your computer and use it in GitHub Desktop.
Convert OpenSSH public key to PKCS#1 in HEX format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -e -m pem -f ~/.ssh/id_rsa.pub | sed '1d;$d' | tr -d '\n' | base64 -d | od -t x1 -An | tr -d ' \n' | tr 'a-f' 'A-F' | sed 's/\(.\{8\}\)/\1 /g' | fold -w 54 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!