GPG handy recipes

Posted: 30 August, 2021 Category: backend Tagged: gpgkeys

Create a private + public keypair

sudo apt-get update && sudo apt-get install -y pass gnupg
gpg --gen-key
# (follow prompts including supplying a passphrase)

I actually accidentally exposed my passphrase somewhere while typing blindly. So then I got thinking, hrmmm... is it possible to change the passphrase for a key? emoji-thought_balloon

Turns out, it is!

Edit the passphrase for a key

pgp --list-keys
# (grab the appropriate key id)
pgp --edit-key 123abc456 # supply ur key id as arg
# you will get the pgp prompt. type passwd to change the pass phrase
pgp> passwd
# (follow prompts, type 'save' at end to keep changes)
prg> save