What are SSH keys?

SSH keys are a secure way to log into remote computers and servers without using passwords.

They come in pairs: a public key and a private key. The public key is shared with the remote system, while the private key stays secret on your local machine.

When you try to connect, the remote system checks if your private key matches its stored public key. If they match, you’re allowed in. This method is more secure than passwords because the private key is much harder to guess or steal, and you don’t have to send any secret information over the network.

Creating your SSH key

:bulb: if you already have one, you are golden

Open your terminal. We can start checking if we ever had created an SSH key before:

ls -l ~/.ssh/*

If you see some files you might have already created an SSH key. In any case we can create a new one:

ssh-keygen -t rsa  -N ""

now if you try again the ls command you should see two files:

~/.ssh/id_rsa
~/.ssh/id_rsa.pub
  • id_rsa is your private key, keep it safe! is like your key
  • id_rsa.pub is your public key, you can share it with the world! is like your lock, and you can add it to a server so that you can enter with your key.

to see your public key:

cat ~/.ssh/id_rsa.pub

:bulb: From a Mac, you can copy the public key to your clipboard with:

pbcopy < ~/.ssh/id_rsa.pub

Adding the key to BioSphere

  1. Login to BioSphere

  2. You might notice a warning that you don’t have any keys yet. BioSphere login

  3. Click on the settings icon on the top right corner. BioSphere login

  4. Paste your public key in the text area, accept the terms and conditions at the bottom, and hit the Submit button.

BioSphere login


Previous submodule:
Next submodule: