Skip to content

Instantly share code, notes, and snippets.

@ps1dr3x
Created October 13, 2023 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ps1dr3x/fa0f9ee956c6154ef8e8204c225ff390 to your computer and use it in GitHub Desktop.
Save ps1dr3x/fa0f9ee956c6154ef8e8204c225ff390 to your computer and use it in GitHub Desktop.
GPG extend expiration (primary key and subkeys)

List Your Keys and Subkeys

gpg --list-keys --with-subkey-fingerprint

Edit the Key (ID of the primary key, not the subkey ID)

gpg --edit-key <KEY_ID>

Extend validity of the primary key

expire

Select the subkey(s) and extend their validity

key <N>
expire

Save and exit

save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment