Chapter 2. Creating RSA public-private key pair
The RSA public-private key pair is required to install the Red Hat OpenShift Data Foundation Managed Service provider and consumer add-ons.
The following procedure uses OpenSSL to create the public-private key pair. You can use any other method to create the RSA public-private key pair.
Prerequisites
- Ensure you have OpenSSL installed on your machine.
Procedure
To create the private key, run the following command using the command-line interface:
openssl genrsa -out key.pem 4096
$ openssl genrsa -out key.pem 4096Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Generating RSA private key, 4096 bit long modulus(2 primes) .......................++++ .......................++++
Generating RSA private key, 4096 bit long modulus(2 primes) .......................++++ .......................++++Copy to Clipboard Copied! Toggle word wrap Toggle overflow To create the public key, run the following command using the command-line interface:
openssl rsa -in key.pem -out pubkey.pem -outform PEM -pubout
$ openssl rsa -in key.pem -out pubkey.pem -outform PEM -puboutCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
writing RSA key
writing RSA keyCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification steps
To check if the private key is generated, run the following command:
ls
$ lsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
key.pem
key.pemCopy to Clipboard Copied! Toggle word wrap Toggle overflow To check if the public key is generated, run the following command:
ls
$ lsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
pubkey.pem
pubkey.pemCopy to Clipboard Copied! Toggle word wrap Toggle overflow