![]() |
VOOZH | about |
Sr Technical Content Strategist and Team Lead
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix
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!
im trying to migrate from another host to DO and this is keeping me for days from migrating my websites from the other host. iโve been trying literally everything and still no success to connect to root in fact yesterday i created a sudo user (as shown in this tutorial) but i couldnโt edit files when connected via ftp client with that user. then i tried to connect to root again, and guess what: โthe almighty PERMISSION DENIEDโ.
iโve been deleting around 20 droplets and created new keys on my computer, then copied the keys to the authorized_keys file, and when i try to login to root the PERMISSION DENIED is haunting me even in my dreams, man!
i knew DO is a bit complicated but i never thought i would stuck at this point which had to be so straight forward.
is there anything you could help me with this in a step by step basis because i cant even articulate a question because i tried a lot of things and none seems to work.
thanks!
Great article however how do I remove the password from the created user? So, I can only SSH into it like root.
FYI: On Ubuntu 20.04 and if you are using SSH Keys, after you create your keys and provision the DO server, the username for login is root.
For example:
me@my-workstaton:~$ ssh root@138.197.173.34
Once on the DO server, I can create a regular account and I can add the contents of my id_rsa.pub file to the new account.
I then should be able to login my new account on the DO server.
I then add that user account to the sudoerโs file.
this was a bit complex for me, so i followed this and it worked for me https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/create-with-putty/
I had some trouble with copying the intended public key when specifying a different path other than id_rsa (for example, I named it blah_key, and it lived at ~/.ssh/blah_key). Every time I attempted to copy via ssh-copy-id utility, it would grab the key under the default path. The following command helped me set the intended key as an authorized key on the server:
ssh-copy-id -i ~/.ssh/mykey user@host
TLDR; if a user chose to write their key to a different path other than the default (id_rsa), hereโs how you copy that public key from that path.
Thank you for this tutorial to setup key based authentication. I have one comment, if we disable the Password Authentication for SSH, it will not allow to establish a ssh session on the server as it doesnโt have public keys in the authorized keys for its own users. I solved this by creating keys using ssh-keygen and copying the public key to authorized keys list.
Nice article. Is there a PDF, Sphinx or Word version for offline use ?
This is not helpful at all.
donโt disable password authentication before you make sure ssh auth is working correctly. I got caught and cant log back in.
I am getting permission denied when trying to upload the key.
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.