diff --git a/notes/gpg.md b/notes/gpg.md new file mode 100644 index 0000000..af2f626 --- /dev/null +++ b/notes/gpg.md @@ -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 +``` diff --git a/notes/ssh.md b/notes/ssh.md index bffc687..7474dd7 100644 --- a/notes/ssh.md +++ b/notes/ssh.md @@ -12,6 +12,6 @@ ssh-keyscan localhost # Generate new ssh key -``` +```sh ssh-keygen -t ed25519 -C "bob@example.com" ```