Home > Network > SSL > openssl > opensslprivatekey | About

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -out user.key

.oO genpkey is a supersession of genrsa (man openssl)

.oO since genpkey supports more algorithmes than genrsa, you must provide the -algorithm RSA switch.

.oO the -pkeyopt allow to provide options for the key genration. Here, we specify a 4096-bit key with rsa_keygen_bits:4096.

.oO the default is to print the key on stdin, unless -out is given like in our example. In bash, > user.key would have the same effect.


contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code opensslprivatekey (generated for current page)