Last active
June 30, 2021 10:40
-
-
Save epreston/5bf5609c37ca0bfdc447782a513d76e8 to your computer and use it in GitHub Desktop.
create a quick audit of ssh public keys - name, strength, sha, type,
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
# Audit SSH Keys | |
OUTPUT_FILE="audit-$(date +"%FT%H%M%z").txt" | |
for file in *.pub | |
do | |
echo $file | |
echo -n "$file " >> $OUTPUT_FILE | |
ssh-keygen -l -f "$file" >> $OUTPUT_FILE | |
done | |
# DSA = Unsafe and even no longer supported since OpenSSH version 7. | |
# RSA = Concerning, see length. 3072 or 4096-bit length is ok. | |
# ECDSA = Trustworthiness concern on the NIST curves. | |
# Ed25519 = Recommended public-key algorithm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment