notes: add info about gpg
This commit is contained in:
parent
5a6fed27cf
commit
232a3f23bd
2 changed files with 34 additions and 1 deletions
33
notes/gpg.md
Normal file
33
notes/gpg.md
Normal 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
|
||||||
|
```
|
|
@ -12,6 +12,6 @@ ssh-keyscan localhost
|
||||||
|
|
||||||
# Generate new ssh key
|
# Generate new ssh key
|
||||||
|
|
||||||
```
|
```sh
|
||||||
ssh-keygen -t ed25519 -C "bob@example.com"
|
ssh-keygen -t ed25519 -C "bob@example.com"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue