notes: add info about gpg

This commit is contained in:
Dmitriy Pleshevskiy 2023-03-17 12:21:12 +03:00
parent 5a6fed27cf
commit 232a3f23bd
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
2 changed files with 34 additions and 1 deletions

33
notes/gpg.md Normal file
View file

@ -0,0 +1,33 @@
# 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
```

View file

@ -12,6 +12,6 @@ ssh-keyscan localhost
# Generate new ssh key
```
```sh
ssh-keygen -t ed25519 -C "bob@example.com"
```