Use an OpenSSL command to create private keys.
You can use the same OpenSSL command for both Windows and Linux. Use a console where you can run commands. In Windows, open a command prompt and run the command. In Linux, open a terminal and run the command.
Run the following command.
openssl genrsa -out server.key 2048
As a private key, the server.key file is created in the folder where you run the command.
Option |
Description |
---|---|
-out<private-key-file-name> |
A private key file is created with the specified name. The file name can be any. |
2048 |
Key length. Specify 2048 or longer to increase security. |