From 976135d17ea0b11a603d1468dd6cf7fd00b76b7d Mon Sep 17 00:00:00 2001 From: ruslan Date: Sun, 12 Jan 2025 22:01:41 +0100 Subject: [PATCH] Create pgp-commands.md --- content/posts/pgp-commands.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 content/posts/pgp-commands.md diff --git a/content/posts/pgp-commands.md b/content/posts/pgp-commands.md new file mode 100644 index 0000000..e027262 --- /dev/null +++ b/content/posts/pgp-commands.md @@ -0,0 +1,28 @@ +--- +title: Памятка по PGP/GPG +description: gnupg - export, import and renew +date: 2025-01-12T22:00:00+01:00 +tags: [linux, pgp] +--- +## Экспорт + +```bash +gpg -a --export-secret-keys > private.asc +gpg --export-ownertrust > trust.txt +``` + +## Импорт + +```bash +gpg --import private.asc +gpg --import public.asc +gpg --import-ownertrust trust.txt +``` + +## Продление + +```bash +gpg --list-keys +gpg --quick-set-expire 1y +gpg --export | curl -T - https://keys.openpgp.org +```