Question

Can I re-use SSH keys?

I just created a droplet for the first time (and this is my first time with any server). I’m now on the SSH keys page https://www.digitalocean.com/ssh_keys, where the first instruction tells us to check if SSH keys exist, and then it gives instructions for generating new SSH keys. In my case, using the command that the instructions gave, I discovered that I already have SSH keys (which I’m guessing I generated when I signed up for github or heroku)

Questions

  1. Should I reuse this SSH keys or generate new keys?

  2. The instructions talk about adding SSH keys to digital ocean and then creating a server. In my case, I created the droplet before adding SSH keys. Will this create any kind of problem I should be aware of?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I can confirm LazyTiger’s second point. Adding keys to your DO account doesn’t touch any extant droplet.

  1. If you can’t recall where the keys came from, you should create a new pair. The SSH key replaces the password of the selected account so the private key is top secret. You should also create the keys on your local computer to make sure the private key isn’t sent over the internet. <br> <br>There’s a nice tutorial: http://katsande.com/using-puttygen-to-generate-ssh-private-public-keys (I used 4096 bits instead of 2048). <br> <br>2) As far as I remember, adding a new Key does nothing to your current droplets. It only adds the option to add them to new ones. To use your key on an existing droplet you have to add the public key manually to ~/.ssh/authorized_keys