IPSEC-NEWHOSTKEY(8)
π IPSEC-NEWHOSTKEY β¨
okay so bestie, this is ipsec-newhostkey from section 8 of the manual (executable programs, yk the vibe) β and honestly? she's giving key-generation main character energy π
πΈ NAME πΈ
ipsec-newhostkey β generate a new raw RSA authentication key for a host
π SYNOPSIS π
ipsec newhostkey [--quiet | --verbose] [--nssdir directory]
[--nsspw password] [--seeddev device] [--seedbits bits]
[--bits bits] [--curve curve] [--keytype rsa|ecdsa]
β¨ DESCRIPTION β¨
so like. newhostkey makes you an RSA public/private key pair that's suitable for authenticating this host, and then it stores that whole thing in the NSS database. iconic behavior honestly π
if you wanna know how to extract the public key out of the NSS database? go read ipsec-showhostkey(8) β she's got you π«Ά
π¦ Output Options π¦
--quietβ this one suppresses both thersasigkeynarrative and the existing-file warning message. like, shhh. no notes. π€«--nssdirdirectory β tells it where the NSS DB directory lives, the one where the certificate key and modsec databases hang out. default is/var/lib/ipsec/nssποΈ--passwordpassword β sets a module authentication password, which might be required if FIPS mode is turned on. lowkey important, don't sleep on it π--bitsbits β the number of bits in the RSA key. current default is a random (multiple of 16) value between3072and4096. the minimum allowed is2192. so like, don't come at her with a tiny number please π--curvecurve β names the curve used in the ECDSA key. current default issecp256r1. for the full list of available curve names, go checkipsec-ecdsasigkey(8)π--keytypersa|ecdsaβ picks the type of key: eitherrsa(RSA) orecdsa(ECDSA). if you omit it, the current default isrsa. fr fr β¨--seeddevdevice β specifies the random device (default/dev/random) used to seed the crypto library RNG. slay π²
π FILES π
/dev/random, /dev/urandom
π SEE ALSO π
ipsec-rsasigkey(8), ipsec-showhostkey(8), ipsec.secrets(5)
π HISTORY π
Originally written for the Linux FreeS/WAN project <https://www.freeswan.org> by Henry Spencer. Updated by Paul Wouters. a whole legacy, we love to see it π
π BUGS π
okay so, same as with rsasigkey β the run time is difficult to predict. because depletion of the system's randomness pool can cause arbitrarily long waits for random bits for seeding the NSS library, and the prime-number searches can also take unpredictable (and potentially large) amounts of CPU time. like it's not being dramatic, it just. might take a while. π
See ipsec-rsasigkey(8).
bestie this is a real warning, not a vibe: long unpredictable waits are genuinely part of the deal here. plan accordingly π
π AUTHOR π
Andrew Cagney, Daiki Ueno, Daniel Kahn Gillmor, D. Hugh Redelmeier, Jose Quaresma, Michael Richardson, Paul Wouters, Tuomo Soini
and that's the whole page, bestie!! this was Libreswan 5.4.1, dated 10/23/2026 β tysm for reading, go generate some keys, ily, bye πβ¨π¦
π¦ where this page comes from
- fedora 43: libreswan 5.4.1-1.fc43 Β· GPL-2.0-or-later AND MPL-2.0
- fedora 44: libreswan 5.4.1-1.fc44 Β· GPL-2.0-or-later AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms