In this article https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets Etel notes that we can turn off PasswordAuthentication by setting it to no in /etc/ssh/sshd_config after we can successfully authenticate.
If we create a snapshot of droplet where this is allready done, to avoid having to do it every time, will everything still work as expected (Assuming I still have the same SSH keys on the client)?
Also could digital ocean just default this to no, since presumably if we are logging in with SSH, it really should be no?
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!
When you create a droplet with a SSH key - meaning you won’t receive a password - then it’s already defaulted to PasswordAuthentication no
Hello all,
As per hanses’s comment if you create the droplet with a ssh-key the PasswordAuthentication will be set to No
However, if you’re using password authentication and would like to have it disabled, simply follow these steps:
You can also temporary enable the PasswordAuthentication from no to yes in order to access your droplet using a password and then once you’ve entered your key to disable the PasswordAuthentication again. This way is considered more secure than uploading the key to a Dropbox in case you don’t have any other server to us.
sudo nano /etc/ssh/sshd_configHope that this helps! Regards, Alex
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.