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!
Hey!
To allow SSH login for the non-root user ssadmin, you need to copy the SSH public key from the root user’s .ssh/authorized_keys file to the ssadmin user’s .ssh/authorized_keys file.
Here’s a step-by-step guide on how to do this:
Login as root:
ssh root@178.62.71.229
Create the .ssh directory for the new user and set the correct permissions:
mkdir -p /home/ssadmin/.ssh
chmod 700 /home/ssadmin/.ssh
Copy the root user’s authorized_keys file to the new user’s .ssh directory:
cp /root/.ssh/authorized_keys /home/ssadmin/.ssh/
Change the ownership of the .ssh directory and the authorized_keys file to the new user:
chown -R ssadmin:ssadmin /home/ssadmin/.ssh
Set the correct permissions for the authorized_keys file:
chmod 600 /home/ssadmin/.ssh/authorized_keys
After completing these steps, you should be able to SSH into the server as the ssadmin user using the same public key authentication method:
ssh ssadmin@178.62.71.229
Let me know how it goes!
Best,
Bobby
Heya @chrishunterjohnsonseal,
By default Droplets come with PasswordAuthentication disabled. As such, I’ll recommend you to add an SSH key for the user.
To do so, you’ll need to go to the user’s Home directory, create a directory called .ssh and inside that directory create the file authorized_keys. Inside the file paste the public SSH key for your user.
For further details you can check this Docs page as well:
https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/
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.