Are you getting the Permission Denied (Publickey) error? I imagine you’re starting to setup a Digital Ocean droplet or Ubuntu on another cloud provider and need to ssh into your server? After trying are you getting the permission denied (Publickey) error? I was setting up Jenkins and wanted to quickly access the droplet from my machine but kept getting errors. It turned out to be the following parameters in my sshd_config file. I’m using Ubuntu 18.04. So, I first executed the following to open the sshd_config file with nano.
sudo nano /etc/ssh/sshd_config
Then you’ll want to change PermitRootLogin prohibit-password to PermitRootLogin yes. You’ll also want to change PasswordAuthentication no to PasswordAuthentication yes. Exit nano with ctrl+x. Hit y for yes. Now I’d reboot and you should be able to access the droplet. Give the droplet a few minutes to boot back up before trying to access it and you should be good to go. Happen to be looking for more articles on bash? Check this one out! Happy coding!