Bobcares

Add SSH Key Linode | A Simple Way

by | Aug 1, 2022

Let’s take a closer look at adding the SSH key in Linode with these simple steps. In accordance with our Server Management service, Bobcares responds to all inquiries, small or large.

Adding SSH key In Linode

When a user creates a Linode, they can add the SSH key. The choice will show up below the field for the root password. We need to first add the SSH key to the account in Cloud Manager. Here, our Support team outlines the process for adding the SSH key to Linode.

  1. In the top right corner, click on the username. In the case of small screens, it is usually on the left-hand sidebar
  2. Go to My Profile
  3. Now click SSH Keys
  4. Create a label for the key
  5. Finally, click on the Add Key

In this way, we can definitely add an SSH key to the Linode while creating Linode. SSH keys are in pairs and kept in plain text files. The private key is kept on the local machine and must be protected. The file’s permissions must be set to prevent access by other users of the machine.

The server the user intends to log in to receives the public key. The public key can be freely distributed to others. We will be able to access that server if someone else adds the public key to theirs. Websites or services ask for SSH public key.

We must upload the public key to the server for the Linode servers to recognize and accept the key pair. From client Linux and macOS systems, there are several ways to upload the public key to the Linode. Now let us examine how we achieve it.

Upload SSH Public Key

Using ssh-copy-id: Enter the following command. Then provide the user’s password in the following prompt.

ssh-copy-id your_username@192.0.2.0

Now make sure to log in to the server with the key.

Manually Copying the Public Key: We can also upload the SSH key manually.

  1. We can use the following command to output the contents of the public key file:
    cat ~/.ssh/id_rsa.pub
  2. Now use the command ssh to add the key:
    ssh your_username@192.0.2.0
  3. Then create the ~/.ssh directory and authorized_keys file if they don’t already exist:
    mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys
  4. Grant the ~/.ssh directory and authorized_keys files appropriate file permissions:
    chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
  5. Then open the authorized_keys file with a text editor. Then, paste the contents of the public key from step 1 on a new line at the end of the file.
  6. Now we can save and close the file.
  7. Confirm that we can log in to the server with the key.

Upload The SSH Key To Linode Cloud Manager

We should first upload the SSH key to the account in order to use it when deploying new Linodes. We can accomplish this by following the Manage SSH Keys >> Add a Public Key guide in the Linode Cloud Manager.

[Looking for a solution to another query? We are just a click away.]

Conclusion

SSH key provides access credentials for the SSH (secure shell) network protocol. While creating Linode, we have the option to include the SSH keys. In this article, our Support team shows us how to add the SSH key and also how we can upload SSH key to the Linode Servers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.