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.

Note

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

  1. To create the private key, run the following command using the command-line interface:

    $ openssl genrsa -out key.pem 4096
    Copy to Clipboard Toggle word wrap

    Example output

    Generating RSA private key, 4096 bit long modulus(2 primes)
    .......................++++
    .......................++++
    Copy to Clipboard Toggle word wrap

  2. 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
    Copy to Clipboard Toggle word wrap

    Example output

    writing RSA key
    Copy to Clipboard Toggle word wrap

Verification steps

  1. To check if the private key is generated, run the following command:

    $ ls
    Copy to Clipboard Toggle word wrap

    Example output

    key.pem
    Copy to Clipboard Toggle word wrap

  2. To check if the public key is generated, run the following command:

    $ ls
    Copy to Clipboard Toggle word wrap

    Example output

    pubkey.pem
    Copy to Clipboard Toggle word wrap

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat