Very generally, a private key is a way to hide something. In computer security, we can sometimes think of the lock as the public key. The public and private keys must work together to be allowed access. SSH is an acronym for
secure shell which is basically a security protocol to give us secure terminal access (access to the computer or server) over the web.
We are going to create a public and private SSH key pair on this page. This SSH key should not be shared.
Here are a couple ways you can use your SSH public key:
Windows: To follow along, you should use WSL (Windows Subsystem for Linux) to get the same experience here.
Mac: Already has
ssh-keygen command available.
Linux: If you don’t have
ssh-keygen install it with your OS’s package manager.
Open a terminal
Create an ssh key with the following command
ssh-keygen -t ed25519 -C "firstname.lastname@example.org"
We are going to be asked where we want to store the keys
.sshinside your home directory.
You will be asked to enter a passphrase, and to enter it again for verification. This will be used whenever you have to verify your key.
id_ed25519private key file, and the
id_ed25519.pubpublic key file.