Setting up a fresh debian server on digitalocean to be a python application server.
Upon login it prompted for the password, which was having trouble pasting any method other than right-click :/
But that was not an issue for long as I used ssh-copy-id to get my private key to be able to log in.
Then I added a new user and added that user to the sudo group. I added the same private key to that user's ~/.ssh/authorized_keys.
This didn't work for login, because I created the /home/newuser/.ssh directory as root, so I needed to chown it.
Then I could ssh in as the new user using ssh key. I disabled password login.
When I tried to disable root login, it didn't work because it was loading a custom config file before the PermitRootLogin No. So I removed the PermitRootLogin Yes from the custom config file.
I also added passwordless sudo to my user using sudo visudo and modifying the sudo group to set NOPASSWD: ALL.