Noob here.
I set up my droplet over a years ago, and followed instructions to set up private key for ssh. If I recall correctly, it seemed to work fine. I have not accessed my droplet in several (many) months.
When I access now thru my user account (not root), it prompts me for a pwd and allows me to login. In the user’s .ssh directory the is an “authorized_key” file with what appears to me a key saved in it. My understanidng from reading on DO’s help forum is that the ssh keys are meant to work in lieu of root password log on, and that if I am logging on as user (not root) I should not be promoted for a paraphrase. So, I assume that there shouldn’t be any key info in the .ssh directory for the user.
When I access my account thru root, I am prompted for my root pwd (no the paraphrase) and am allowed to login as root. In the root’s .ssh directory, however, there is an authorized_key" file but it is empty.
Moreover, on my local machine, the only “private certificate” is one that I recent generated for another website (not my DO droplet). There doesn’t seem to be a “private certificate” my DO droplet.
Should I just start over as far as adding the ssh key?
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!
A few follow up questions:
Shouldn’t there be a “id_rsa” file (a private key) on my local machine? There is not.
The “authorized_keys” file in the .ssh of my root is empty. The file is there, but nothing is in it. The “authorized_keys” file in the .ssh of my user does have what apprears to be a key in it.
I am not sure how to tell if the key is working. That is, the is no private key in on my local machine, but I can login nevertheless. Shouldn’t I be prevented since there is public key on my DO drplot, but no private key on my local machine?
Thanks in advance.
You have to manually disable password authentication after setting up key based authentication.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.