- Login to the console on digitalocean website.
- Type sudo nano /etc/ssh/sshd_config
- Change PasswordAuthentication from “no” to “yes” and save the file
- Restart sshd (Debian:
sudo service sshd restart
)
- Run `ssh-copy-id [user]@[hostname or IP address]
- 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 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
- Restart sshd (Debian:
sudo service sshd restart
) - Log out and attempt to log back in (if using PuTTY make sure you set up auth parameters to point to your private key)