When a user generates a GPG public-private key pair, some information is stored along with the key-id. Using the –edit-key option, one can edit the information stored with the key. (How to generate a GPG key pair?)
How to add or delete key components of a GPG key?
To add or delete key components like uid, subkey, etc., type the following lines in the command line:
# gpg --edit-key <key>
It will display information about the key and come to the command prompt.
- Use the command adduid to add a user-uid.
- Use the command addkey to create a subkey under your key.
- Use the command deluid to delete selected user-ids from your key.
- Use the command delkey to delete selected subkeys from your key.
When you add a user-id or subkey, it is self-signed with your master key. So, you would need to give your passphrase along with these commands.
How to revoke key components of a GPG key?
To revoke a subkey, use the revkey command.
# gpg --edit-key [email protected] command> list command> key 1 command> revkey
To revoke a signature on a key, use the revsig command.
# gpg --edit-key [email protected] command> revsig
How to update the expiration time of a GPG key?
You can also update the expiration time of your selected GPG key using …






0 Comments