DigitalOcean Home

How to Add SSH Keys to Droplets

While it is possible to manage your servers using password-based logins, it is often a better idea to set up and use SSH key pairs. SSH keys are more secure than passwords, and can help you log in without having to remember long passwords.

To use SSH keys with your Droplets, you need to:

  1. Create an SSH key using an SSH client installed on your local computer. OpenSSH is included on Linux, macOS, and Windows Subsystem for Linux. Windows users without Bash can use PuTTY.

  2. Add your SSH key to your Droplets. On DigitalOcean, you can upload your SSH public key to your account, which lets you add it to your Droplets at creation time. This lets you log in to your servers without a password while still remaining secure. You can also upload your keys manually after creation.