bsdlabs / ssh-hardening

FreeBSD SSH Hardening
https://github.com/jtesta/ssh-audit/wiki/FreeBSD
BSD 2-Clause "Simplified" License
27 stars 4 forks source link

Regenerate 4096-bit RSA keys #6

Closed jlduran closed 1 year ago

jlduran commented 3 years ago

The command service sshd keygen does not take into consideration the option -b, which specifies the number of bits in the key to create.

For RSA, 2048-bit keys are generated by default on FreeBSD 12.2 and 13.0 (OpenSSH 7.9), and 3072-bit on FreeBSD 14.0 (OpenSSH 8.7).

Fix it by using the full command, just like the other guides.

jlduran commented 2 years ago

Note to self: FreeBSD 12.3-RELEASE & 13.1-RELEASE, when released should generate a 3072-bit by default, hence making this PR less relevant.