Show Table of Contents
B.3. Create a Private/Public Key Pair with Keytool
Procedure B.1. Create a Private/Public Key Pair with Keytool
- Run the
keytool -genkey -alias ALIAS -keyalg ALGORITHM -validity DAYS -keystore server.keystore -storetype TYPEcommand:keytool -genkey -alias teiid -keyalg RSA -validity 365 -keystore server.keystore -storetype JKS
- If the specified keystore already exists, enter the existing password for that keystore, otherwise enter a new password:
Enter keystore password: <password>
- Answer the following questions when prompted:
What is your first and last name? [Unknown]: <userâÂÂs name> What is the name of your organizational unit? [Unknown]: <department name> What is the name of your organization? [Unknown]: <company name> What is the name of your City or Locality? [Unknown]: <city name> What is the name of your State or Province? [Unknown]: <state name> What is the two-letter country code for this unit? [Unknown]: <country name>
- Enter
yesto confirm the provided information is correct:Is CN=<userâÂÂs name>, OU=<department name>, O="<company name>", L=<city name>, ST=<state name>, C=<country name> correct? [no]: yes
- Enter your desired keystore password:
Enter key password for <server> (Return if same as keystore password)
Result
The server.keystore file contains the newly generated public and private key pair.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.