-
Notifications
You must be signed in to change notification settings - Fork 18
DigitalOcean SSH Key
Note: This page describe a general procedure to generate a SSH key and it applies also for other platforms like GitHub.
-
SSH (Secure SHell) keys are a way to establish a fast and secure authentication between two computers.
-
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 commandcat
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.
-
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 orssh-keygen
in Linux and Mac.Press enter until the process of creation is completed, and you can leave blank any question on the prompt.
-
Repeat Step 2 and output the public key to your terminal.
-
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. -
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"
-
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.
Go back to the wiki Home.
Copyright (C) 2021 Stefano Balietti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.