Last active
May 24, 2020 01:16
-
-
Save xguitian/0df5f23cfb9636d3960ca886e081f90d to your computer and use it in GitHub Desktop.
GnuPG tips: Renewal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insert offline Master Key | |
# Import master key | |
gpg --import <path_to_master_key> | |
# Edit key to renew | |
gpg --edit-key <email/key_id> | |
# renew each key and subkey with: | |
# key <#> | |
# to select key and | |
# expire | |
# to change expiration date, even if it is already expired, it does _not_ matter | |
# export secret key | |
gpg --export-secret-keys --armor <email/key_id> > <key_id>.priv.asc | |
# export secret subkeys | |
gpg --export-secret-subkeys <email/key_id> > <key_id>.sub_priv.asc | |
# export pub keys | |
gpg --export --armor <email/key_id> > <key_id>.pub.asc | |
# Move to external storage | |
mv *.asc <path_to_offline_storage> | |
# (Optinal) Publish | |
gpg --send-key <key_id> | |
# (Optional) On other places import renewed keys | |
gpg --import <path_to_secret_subkey> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment