DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

How to Add an SSH Key When Creating a DigitalOcean Droplet

Select SSH-key authentication during Droplet creation and attach a public key. Learn the Control Panel and doctl routes, plus what changes for existing Droplets.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add an SSH key to a new DigitalOcean Droplet, select SSH key under Choose Authentication Method during creation, then attach at least one public key. If your key is not already available to your team, upload it first in the Control Panel or import it with doctl. Keep the matching private key on your computer; it is what your SSH client uses to connect.

Before you create the Droplet: prepare an SSH key pair

An SSH key pair has two parts: a public key, which you can add to DigitalOcean, and a private key, which must stay with you. DigitalOcean recommends SSH-key authentication for Droplets because password-based authentication is less secure, according to its recommended Droplet setup documentation.

As an Amazon Associate I earn from qualifying purchases.

Generate a key on Linux, macOS, or Windows Subsystem for Linux

DigitalOcean documents OpenSSH’s ssh-keygen utility for these systems. Its documented default filenames in ~/.ssh are id_ed25519 for the private key and id_ed25519.pub for the public key. When a tool asks for your public key, use the file ending in .pub.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Protect the private key with a passphrase if possible. Do not overwrite a key pair that you still need: DigitalOcean warns that replacing an existing pair can leave you unable to authenticate with the old key.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Windows without Bash

For Windows users without Bash, DigitalOcean documents PuTTY and PuTTYgen as the route for creating and using SSH keys. Add the resulting public key to your DigitalOcean team or during Droplet creation, and retain the corresponding private key for your SSH client.

Add the public key to your DigitalOcean team

If your public key is not already listed for the team that will own the Droplet, add it before provisioning. DigitalOcean’s Control Panel path is:

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
  1. Switch to the intended team in the Control Panel.
  2. Open Settings → Security → SSH Keys → Add SSH Key.
  3. Paste the public-key text into Public Key.
  4. Enter a recognizable Key Name, then save.

A team-uploaded key becomes available to select for future Droplets. Make sure you are working in the team that will create the Droplet; a key attached to the wrong account or team may not appear in the creation flow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Select the SSH key while creating the Droplet

  1. Open the Droplet creation page and configure the Droplet as needed.
  2. Under Choose Authentication Method, select SSH key.
  3. Choose Add SSH Key to enter a public key from the page, or select a key already uploaded to the team.
  4. Confirm at least one key is attached before creating the Droplet.

After the Droplet is created, connect with the private key that matches the public key you attached. The public key is not a substitute for the private key, and uploading the private key to DigitalOcean is not the setup described here.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Import a key with doctl instead

If you prefer a terminal workflow, DigitalOcean documents importing a local public-key file to your account with doctl:

doctl compute ssh-key import <key-name> --public-key-file <path-to-public-key>

Replace <key-name> with a label you will recognize and <path-to-public-key> with the path to the public-key file, such as the matching .pub file. Account import makes the key available when creating Droplets; it does not install the key on Droplets that already exist. The command reference was generated 1 October 2026 for doctl v1.177.0.

Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Control Panel or doctl: which route fits?

Route Best fit What it does
Control Panel Visual setup or a key you want available to the team for repeated use Uploads the public key to the team, where it can be selected for new Droplets.
doctl Terminal-based provisioning Imports a local public-key file to the account for use when creating Droplets.

Both routes prepare a key for a new Droplet. Neither route, by itself, adds a key to an existing Droplet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If the Droplet already exists

DigitalOcean says the Control Panel cannot add or modify SSH keys on a Droplet after creation. For an existing server, you need command-line access or a recovery procedure to update the server itself. Manual installation uses the target user’s ~/.ssh/authorized_keys file; DigitalOcean specifies restrictive permissions of 700 for ~/.ssh and 600 for authorized_keys. Do not confuse importing a key into your DigitalOcean account with installing it on a running server.

Best Value
FIDO2 U2F Security Key Passkey Two-Factor Authentication (2FA) USB Key PIN+Touch (Non-Biometric) USB-A Type TrustKey T110
  • Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
  • Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
  • Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
  • Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
  • For the driver download and user guide, please visit TrustKey Solutions Home support page.

Common problems and fixes

  • No SSH key appears on the creation page: check that you switched to the intended team and uploaded the public key there, or use Add SSH Key during creation.
  • You selected SSH-key authentication but cannot proceed: attach at least one key before creating the Droplet.
  • You cannot connect after provisioning: confirm that your SSH client is using the private key corresponding to the public key attached to the Droplet. Check that you are using the correct local account and key file.
  • You imported a key with doctl but an existing server still rejects it: account import only makes the key available for new Droplets; an existing Droplet needs a server-side update or recovery procedure.
  • A previously working key stopped authenticating after key generation: if you overwrote the old pair, the private key that matched the installed public key may no longer be available. Keep existing key pairs intact when they are still needed.

Control Panel labels and the cited instructions were marked last verified 13 July 2026 by DigitalOcean. Check the current interface if its labels have changed.

Or let it run in the cloud

This is a separate service for keeping a pre-recorded YouTube channel live 24/7; it does not manage Droplets or SSH keys. With StreamNeo, upload a recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; uploaded video streams at its original quality up to 4K 60fps at one flat price per slot; StreamNeo attempts automatic recovery if YouTube drops the stream; and the first day is free with no card. Monthly pricing is $9.99 per month. See StreamNeo or start the free first day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.