another ssh key access to a droplet

April 13, 2015 656 views

Hi I have an established with a ssh key, which is my main machine, and in the office create another ssh key machine, and add that key to the panel of my droplet, but when access from the terminal of the machine asks me which no password which is no way to recover the password, greetings that are well

1 Answer

You cannot add a key to an existing droplet via the control panel. Adding it to the control panel makes it available to be automatically inserted into new droplets you create but for an existing droplet you will need to:

1.) Copy your new key's content to your clipboard.

2.) Log into your droplet using the existing ssh key (the one added when it was created).

3.) Open the file "/root/.ssh/authorized_keys" and paste the new key's content to the end of this file.

You should now be able to authenticate with either key.

When you create a new droplet you can simply select both keys from the create page and they will be automatically inserted in new droplets.

Have another answer? Share your knowledge.