6.2.4.8 mkkey
Generate and write keys in PEM format.
Purpose
The mkkey
command generates and writes a private key to a regular
file in PEM format. You can also generate and write the corresponding public key to
a regular file in PEM format.
Syntax
mkkey [ --private-key-file pem-file ] [ --public-key-file pem-file ] [ --attributes attribute=value[,attribute=value] ... ]
Command Options
The options for the mkkey
command are:
-
--private-key-file
: Specifies a regular file location for the private key. -
--public-key-file
: Optionally specifies a regular file location for the corresponding public key. -
--attributes
: Optionally specifies attributes to change. This option provides an alternative method for specifying the key file names.
Examples
Example 6-47 Generate a Key Pair
The following examples generate a key pair and stores the private and public keys in
/home/user/privatekey.pem
and
/home/user/publickey.pem
, respectively.
@> mkkey --private-key-file /home/user/privatekey.pem --public-key-file /home/user/publickey.pem
@> mkkey --attributes privateKeyFile=/home/user/privatekey.pem,publicKeyFile=/home/user/publickey.pem
Parent topic: Security and User Management