I just did a one click install of MongoDB. I’m SSH into the machine and its all ok.
Now, I want to disable password to the machine to prevent brute force, however two different articles are stating two different things to achieve this:
The later, I can’t actually see this in my /etc/ssh/sshd_config file.
Also by doing this I presume if I access the console via the Digital Ocean page, I can still use the password to login?
If not, then what would happen the certs on my machine went missing?
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.
From a security standpoint, disabling root login and creating a sudo user is recommended – it’s what many would refer to as a best practice. Please don’t say it’s not important as that’s a misconception. When a sudo user is perfectly capable of handling root level commands and, unlike root, is not a well known and highly targeted user, there’s no excuse to allow root logins.
When it comes to security and preventing potential attacks, it’s best to simply create a sudo user and disable root login. The root user is well-known and will be the first one targeted by an attacker. When it comes to automated attacks, when root login is disabled, the login attempts will simply fail.
If you want to take things one step further, I would recommend that your sudo user not be a common user that is given ownership over any specific directories or files. When it comes to ownership of web-facing files and directories, you should create a user that has standard limited permissions.
noenforces the use of SSH Keys for user accounts instead of plain-text passwords.
Disabling password authentication is far more secure and a much better option, though it does mean that you will have to keep up with your SSH Keys locally, otherwise you won’t be able to log in.
Want to learn more? Join the DigitalOcean Community!
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.
Sign up now
Console in DigitalOcean is unaffected since it doesn’t use SSH.