Skip to content

How to generate an RSA PEM (asymmetric) key pair? ​

Step to generate an RSA PEM (asymmetric) key pair for use with SimpleBackups Encryption

Generating and Using RSA Keys for SimpleBackups ​

This guide will walk you through the steps to generate an RSA private key and derive the corresponding public key for use with SimpleBackups.

Step 1: Generate the Private Key ​

  1. Open a terminal.
  2. Run the following command to generate a private RSA key:
bash
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:4096 -aes-256-cbc
  1. You will be prompted to enter a password (we recommend securing your keys with a passphrase).
plain
.......+......+.....+++++
Enter PEM pass phrase:

Step 2: Obtain the PEM Public Key ​

  1. Use the following command to derive the public key from your private key:
bash
openssl rsa -in private-key.pem -pubout -out public-key.pem
  1. View the contents of the public-key.pem file using:
bash
cat public-key.pem
  1. Copy the contents of the public key file and paste them into SimpleBackups' encryption key field.

Additional Notes ​

🔒

Security: Ensure that your private key (private-key.pem) is stored securely. The passphrase adds an additional layer of security

⚙

Usage: The public key (public-key.pem) will be used by SimpleBackups for encryption purposes. Only share the public key with trusted entities.