Often time, I found myself needing to use a more sophisticated method in signing a document for sharing. It is this notion where we could use PGP developed by Phil Zimmermann or the Opensource version referred to as GPG. We will demonstrate how to create a simple GPG key and how to delete it in your keychain. Again, we will be using a Linux distro called Rocky to demonstrate this task. On a vanilla minimalistic version of rocky Linux. One would need to install one software before generating your GPG key.
sudo dnf install pinentry
The next part will be confirming that we've made such key locally.
Finally, removing your public/private keys arent difficult, there are two commands to execute before removing your public and private key from your local keyring.
This is a simple tutorial to run through on how to generate a few of the ssh keys public/private key pair Authentication. When it comes to using DSA and RSA, they are been phased out due to the vulnerability of these two cryptographic algorithms. It is not recommended to use either algorithm on any production systems. We will demonstrate how to generate these keys using a Linux OS called Rocky inside a host environment via Vmware. The third algorithm is much more secure and can be used in any production environment. This is a new cryptographic algorithm called ed25519, which is highly recommended over RSA and DSA.
so, the RSA key was created inside a VM. I initially had to create a new directory called .ssh in my home directory. My procedures are as follows.
ssh-keygen -t rsa -b 4096 -C YourEMAILAddress@SOMETHING.com
# You can also specify the name of your cryptoGraphic Key file inside this command.
ssh-keygen -t rsa -b 4096 -f .ssh/myPrivateKey -C YourEMAILAddress@SOMETHING.com
Here is an example of how to generate DSA key pair.
Finally, we will use ED25519 cryptographic algorithm to generate this key, which can be used on github, bitbucket, and gitlab.
As you can see, one can simply generate all these keys on linux and even on windows as well by using putty or inside powershell. My final image will be to show the keys generated by each of the above cryptographic algorithms.