Skip to content

Instantly share code, notes, and snippets.

@H0neyBadger
Created October 12, 2018 15:38
Show Gist options
  • Save H0neyBadger/6a2d847524004cb8e009895ae3caa766 to your computer and use it in GitHub Desktop.
Save H0neyBadger/6a2d847524004cb8e009895ae3caa766 to your computer and use it in GitHub Desktop.
authorized_keys to SHA256
while IFS= read -r line; do
A=$( echo "$line" | awk '{print $2}' | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64)
echo "$A"
done < .ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment