I realize this is a bit late, but I had the same problem and managed to solve it. Here are the set of commands that you need to run as root on a new digital ocean droplet (assuming you have already setup root to have ssh access). This will setup
mynewuser with passwordless sudo rights and the ability to ssh into the machine without a password (using only your ssh-key)
adduser --system --group mynewuser
chmod 0700 /home/mynewuser/.ssh/
cp -Rfv /root/.ssh /home/mynewuser/
chown -Rfv mynewuser.mynewuser /home/mynewuser/.ssh
chown -R mynewuser:mynewuser /home/mynewuser/
gpasswd -a mynewuser sudo
echo "mynewuser ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)
service ssh restart
usermod -s /bin/bash mynewuser
Now you should be able to ssh into your new droplet with
I am having a similar problem. My key works when login in for root but not for non-root users.
For anyone out there scratching their heads over this still.... I had this problem..
the only issue for me was that the authorized_keys had to be chmod to 644 in the users .ssh folder
hope it helps