Last active
May 31, 2022 18:50
-
-
Save marksharrison/98cffd9d40c7f2a800403dc0082a661f to your computer and use it in GitHub Desktop.
Regenerate & replace 8192 bit OpenSSH moduli file (for the paranoid)
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/sh | |
# regenerate list of prime numbers to replace pre-generated list | |
# marginally increases security of key exchange protocols | |
# this will take hours or possibly days | |
ssh-keygen -M generate -O bits=8192 moduli-8192-regenerated.candidates | |
# verify regenerated list of primes are valid and not inherently weak | |
ssh-keygen -M screen -f moduli-8192-regenerated.candidates moduli-8192 | |
# replace the original /etc/ssh/moduli file | |
cp moduli-8192 /etc/ssh/moduli | |
rm moduli-8192 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment