Hey all, I was having some issues with the configuration of my Ubuntu 20 LTS server that I was going to use to host my Django website, so I decided to use the “Rebuild” dashboard command to wipe my droplet. However, there are some SSH concepts that are a bit murky that I need clearing up as I cannot log into my server anymore [Getting Permission denied (publickey)].
It is my understanding that, when you initially create your droplet using Digital Ocean, you can use the dashboard tool (the one in Account – Settings – Security) to go though the process of setting a Putty SSH key or an Open-SSH key. I had no issues with this during my initial setup of my droplet (I chose to use Putty). Now, is this next statement correct as it may point to a gap or lack of understanding in my knowledge of how SSH works.
If you “Rebuild” your droplet. You can never use the dashboard SSH tool as it can only be used during Initial creation of your droplet.
The evidence for this statement is here: https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-existing-droplet/ "For security reasons, you can’t add or modify the SSH keys on your Droplet using the control panel after you create it, but you have several options to add and modify them via the command line. "
Does this statement apply even when you Rebuild your droplet?
I have another question that may be connected to the above section. When I Rebuilt my droplet I would expect all ssh keys etc. to be completely destroyed. However, if I use Git Bash on my local computer and type ssh root@[my servers ip address assigned by digitalocean], I get a warning about the identity of the host not being able to be establishd and am prompted yes or no to continue connecting. When I choose yes, I get “Permission Denied (publickey).”
That must mean that my previous statement is false. It seems like there is already a ssh public key on my newly Rebuilt Droplet. I would expect, if it were true that all SSH information is deleted upon Rebuild, that It would ask me for a password.
In sum my two questions are:
Thanks in advance everyone, looking forward to this SSH authentication cleared up so I can continue focusing on the deployment of my website.
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!
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.
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.
Click below to sign up and get $100 of credit to try our products over 60 days!