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

    Example output

    Generating RSA private key, 4096 bit long modulus(2 primes)
    .......................++++
    .......................++++

  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

    Example output

    writing RSA key

Verification steps

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

    $ ls

    Example output

    key.pem

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

    $ ls

    Example output

    pubkey.pem

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

© 2026 Red Hat
Back to top