Work with

Опубликовано: 22 Июль 2026
на канале: Linux tutorials
867
8

In this short video, we'll walk you through a simple backup procedure for your GnuPG (GNU Privacy Guard) key on #Linux #Ubuntu. Your GnuPG #key is essential for secure communication and encryption, so it's crucial to have a backup in case of data loss or system failure.

We'll start by opening the terminal and using the command gpg --list-secret-keys to display a list of your GnuPG keys. Identify the key you want to back up and make note of its key ID.

Next, we'll run the command gpg --export-secret-keys [KEY_ID] > key_backup.asc to export the secret key and save it to a file named key_backup.asc. This file will contain all the necessary information to restore your GnuPG key in the future.

To ensure the security of your backup, we'll recommend storing the "key_backup.asc" file on an external storage device, such as a USB flash drive or an encrypted cloud storage service. Remember to keep this backup in a safe and accessible location.

Lastly, we'll verify the integrity of our backup by importing the key from the backup file. We'll use the command gpg --import key_backup.asc to import the key into our GnuPG keyring. Confirm that the key was successfully imported by running gpg --list-secret-keys again.