Questions regarding the technical specifics of adding SSH on creation.

February 15, 2018 339 views
DigitalOcean Getting Started Ubuntu 16.04

When I create a droplet and add SSH keys during creation, does that assign that ssh key to root, or does it create a new user named whatever I made the ssh's name?

If the former:
What happens if I select two or more ssh keys on creation? Does it randomly pick one to assign to root and create a new user for the other?

If the latter,
How do I connect to root?
What access privileges does that new user get created with?
What happens if I make the ssh key's name "root"?

1 Answer

When you create a droplet with SSH keys the SSH keys are placed under the root user.

There are no other users created and there are no SSH keys placed on any other users.

When you select multiple SSH keys during creation then all of the selected SSH keys are added under the root user.

If you name the SSH keys root it doesn't matter, as that is just a label that you see in the control panel so that you can easier reference what keys you added. For example you can add a label of "Laptop" to specify this is a key stored on your laptop, or "Work Desktop", etc, but it doesn't affect how SSH keys operate or where they are placed as this is simply an easier way to categorize and manage your SSH keys on your account.

If you added the key then you can connect as root per usual and we have a great resource for you to get all of the details here:
https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets

This guide is for Mac OS X and Linux users. Learn how to use SSH Keys with DigitalOcean Droplets.
Have another answer? Share your knowledge.