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.
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.
Log in to the console on the DigitalOcean website.
Type sudo nano /etc/ssh/sshd_config
Change PasswordAuthentication from “no” to “yes” and save the file
Open a terminal on your computer and type ssh username@[hostname or IP address] or if on a Windows box use PuTTY for password login making sure authentication parameters aren’t pointing to a private key
Login with a password
Type sudo nano ~/.ssh/authorized_keys
Paste public key text here and save the file
Type sudo nano /etc/ssh/sshd_config
Change PasswordAuthentication from “yes” to “no” and save the file
Log out and attempt to log back in (if using PuTTY make sure you set up auth parameters to point to your private key)
Hello all,
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.
/etc/ssh/sshd_config
ssh username@[hostname or IP address]
or if on a Windows box use PuTTY for password login making sure authentication parameters aren’t pointing to a private key~/.ssh/authorized_keys
/etc/ssh/sshd_config
Hope that this helps! Regards, Alex
@habibi3731
I’d take a look at the guide below. It’s geared towards 14.04, though it should work on all versions as it’s not OS specific, rather, it’s Apache.
https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-apache-on-ubuntu-14-04