Created
January 15, 2016 08:59
-
-
Save ulif/a05d6feeeeef724622e5 to your computer and use it in GitHub Desktop.
Generate primes for use with SSH
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
#!/bin/bash | |
# | |
# Create primes for use with ssh. | |
# | |
for bitlen in 2048 3072 4096 6144 8192 ; | |
do | |
echo Looking for candidates: $bitlen bits. ; | |
ssh-keygen -G moduli-${bitlen}.candidates -b $bitlen ; | |
cat moduli-${bitlen}.candidates >> moduli.candidates | |
rm moduli-${bitlen}.candidates | |
done ; | |
echo Testing all candidates... ; | |
ssh-keygen -T moduli.strong -f moduli.candidates ; | |
rm moduli.candidates | |
echo Done. Result in moduli.strong ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment