How to extend expiry date of Gnu Privacy Guard Keys (GPG/PGP) keys

When PGP/GPG keys expire, you have option to generate a sub key (if you think your key has been compromised), or you can extend the validity of the current key by extending it’s expiry period. You can extend the key’s expiry period since the keys are not compromised. To continue, Open a terminal window and enter following commands.

$ gpg --list-keys <enter>
Lists all public keys

$ gpg --list-secret-keys <enter>
Lists all secret keys

$ gpg --edit-key 0x21221AC8 <enter>
where 0x21221AC8 is the key ID of key 1

First, the public key.
gpg> key 1 <enter>
gpg> expire <enter>
Enter how long key should be valid

Then, the private key.
gpg> key 1 <enter>
gpg> expire <enter>
Enter how long the key used for encryption should be valid

gpg> save <enter>

Done. Don’t forget to publish it a key server. If you want to understand how GPG/PGP works, see how to work with privacy guard gnupg gpg or pgp for encryption.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s