DigitalOcean SSH Key - nodeGame/nodegame GitHub Wiki

Note: This page describe a general procedure to generate a SSH key and it applies also for other platforms like GitHub.

Procedure to generate and upload a SSH public key

  1. SSH (Secure SHell) keys are a way to establish a fast and secure authentication between two computers.

  2. Verify if you already have a SSH key on your computer (if you never heard of SSH keys before, you probably don't have one). Open a terminal (e.g., Git Bash) and type:

    cd; cat .ssh/id_rsa.pub.

    (command cd; goes to your home directory and command cat shows the content of the file).

    If you see a long sequence of random characters and numbers, congratulations that is your public SSH key and you can jump to Step 5.

  3. If you get a file-not-found error, you need to create a new SSH key with ssh-keygen. Type:

    ssh-keygen.exe in Windows or ssh-keygen in Linux and Mac.

    Press enter until the process of creation is completed, and you can leave blank any question on the prompt.

  4. Repeat Step 2 and output the public key to your terminal.

  5. Copy the public key from the terminal (if you don't know how to copy it, you can open it in your default text editor with the command: cd; start .ssh/id_rsa.pub). Remember to include all characters.

  6. Go to Digital Ocean and add your public key. This procedure may vary in the future, but here are the current steps:

    • Click on the top-right icon with your name and select "Account" from the dropdown menu.
    • Select the "Security" tab from the newly open panel.
    • Click "Add SSH key"
  7. Remember! SSH keys are tied to a specific computer. You will need to create a new SSH key and upload it to Digital Ocean for every computer you use to login into your Droplet.

⚠️ **GitHub.com Fallback** ⚠️