Generating SSH Key Pairs on Linux
Generating SSH key pairs in Linux is a breeze. We'll walk you through the process in just a few simple steps.
Start by opening up a new terminal window.
Next, use the
ssh-keygen
command to start generating you key pair:ssh-keygen -t rsa
You'll now be prompted with a series of questions.
The first of these questions is where you would like to store your key. By default, it will be stored inside your user's
.ssh
directory asid_rsa
. Unless you have an existing key there, the default location is fine.After selecting your key's location, you'll be asked to enter a passphrase for your key.
Note: While it is possible to leave this field blank to generate a key without a passphrase, we recommend that you always set a passphrase on your SSH keys. Setting a passphrase ensures that someone cannot gain access to your key with just the private key file alone.
Once your passphrase has been entered, your SSH key pair will be generated.
To access your public key's contents, you can use the
cat
command like this:cat ~/.ssh/id_rsa.pub
Now that your key pair has been generated and you can access your public key file's contents, you're ready to add it to your Atomic account!