system/notes/gpg.md

34 lines
526 B
Markdown
Raw Normal View History

2023-03-17 12:21:12 +03:00
# Generate key
```sh
gpg --full-generate-key
```
# GnuPG Backup
References:
- https://www.howtogeek.com/816878/how-to-back-up-and-restore-gpg-keys-on-linux/
## Export keys
```sh
gpg --export --export-options backup --output public.gpg
gpg --export-secret-keys --export-options backup --output private.gpg
gpg --export-ownertrust > trust.gpg
```
## Import keys
```sh
gpg --import public.gpg
gpg --import private.gpg
gpg --import-ownertrust trust.gpg
```
## Verify
```sh
gpg --list-secret-keys --keyid-format long
```