I would like to have a secure Ubuntu server. I believe the best way to accomplish this is to only use SSH keys and disable use of the root user account. Accomplishing this is not made easy. The tutorials either show you how to use SSH keys on root or how to use a second account with a password, not a combination of the two. I have tried to do both and failed. The following is what I have attempted to do to accomplish this task.
Create Ubuntu droplet with SSH keys in DO panel. Login to root using SSH key and create secondary user. Paste the SSH key into the secondary users’ ~/.ssh/authorized_keys file. Either disable root login or require SSH keys: PermitRootLogin No || without-password <— which one do I choose here?? Kill the ‘/usr/sbin/sshd -D’ process reload ssh
This textbox defaults to using Markdown to format your answer.
Click below to sign up and get $200 of credit to try our products over 60 days!