How to Manage GnuPG Key in cPanel

June 21, 2023 / cPanel & WHM

In this article, you will learn how to use GNU Privacy Guard Keys in cPanel to control email encryption.

What is GnuPG?

The Gnu Privacy Guard is known as GnuOG or PGP. It is a free software and open-source implementation for public-key cryptography. Public-key cryptography systems use public and private keys (key pairs) to encrypt and decrypt files, e-mail messages, etc. Senders use the recipients’ public keys to encrypt items, and recipients use their private keys to decrypt the items.

Since it is easy to create, import, view, and delete keys by using cPanel.

Follow these steps to create a new Key:

Before using GnuPG encryption, you need to first create a new key pair.

  1. Log into your “cPanel account”.
  2. Search for the “Encryption” from the “Search tool.”
    Encryption
  3. Under Create a “New Key section”, type your name in the text box.
  4. In the text box for “Your Email”, you need to add e-mail address.
  5. Write a “Comment or Nickname” for the key in the text box provided for the Comment/Nickname.
  6. Enter the password that you want in the text box for the “Key Password”.
  7. Repeat the Password in the “Confirm Password” text box.
  8. In the text box for “Expire Date”, Write an expiration date for the key. The default expiration date is one year.
  9. Choose a key size, as the text field for the Key Size list box allows you.
  10. Now, click on “Generate Key”.
  11. When the process is finished, you will see that The Key has been successfully produced.

Follow these steps to import a Key:

You can only import public key if you have a key pair.

  1. Log into your “cPanel account”.
  2. Search for the “Email” and click on the “Encryption.”
  3. Click on “Import Key”.
  4. In the text field, “Copy and Paste” the key text.—–BEGIN PGP PUBLIC KEY BLOCK—–
    Key data
    —–END PGP PUBLIC KEY BLOCK—–
  5. Click on “Import”.

Follow these steps to view and delete a key:

  1. Log into your “cPanel account”.
  2. From the “Search tool”, click on “Encryption.”
  3. Choose the key you want to view or delete by finding it. There will be a private key and a public key for each email account.
    1. Click on “View” to see the key.
    2. Find the private key and click the “Delete” GnuPG Key button to delete it. To confirm your deletion, select “Yes”. Both the private key and the public key will be removed.
      Public keys and private keys

In this way, you can manage the GnPG key in cPanel. For more information on cPanel, visit our knowledge base section.

Dominos Search