Generate GPG Keys #
1. Create Primary GPG Key #
- Run the following command:
gpg2 --expert --full-generate-key
.- These options allows all the options to be presented interactively for the Key Generation.
- This step will allow you to create a passphrase.
- These options allows all the options to be presented interactively for the Key Generation.
- We can verify the Primary key has been created:
gpg2 --list-keys
.- Save the Key ID for the next step!
Now the Primary Key has been created, we can proceed with creating the Subkey pairs.
2. Subkeys #
- We would first need to access the key through this command:
gpg2 --expert --edit-key <Key ID>
. - We can now add the keys as so:
addkey
.- This is an interactive prompt, we will repeat this for the following types of keys:
- Sign
- Encrypt
- Authenticate
- This is an interactive prompt, we will repeat this for the following types of keys:
- Once we have went through and created all the keys, we can save the changes like so:
quit
. - Once we quit, we should check to make sure the keys that we created are available:
gpg2 --list-keys
.