Many VPS providers will enable SSH root password authentication by default. So one of the first things I'll do is install my public key and prohibit password authentication for the root account.

Option 1: Download your public key file from a web server

sed -ri '/\#\s?PermitRootLogin prohibit-password\s?/Id' /etc/ssh/sshd_config
sed -ri 's/PermitRootLogin yes\s?/PermitRootLogin prohibit-password/gI' /etc/ssh/sshd_config
sed -ri 's/PasswordAuthentication yes\s?/PasswordAuthentication no/gI' /etc/ssh/sshd_config
sed -ri 's/#PasswordAuthentication yes\s?/PasswordAuthentication no/gI' /etc/ssh/sshd_config
mkdir ~/.ssh
curl -fsSL https://someserver123.com/mykeys.txt -o ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
chown -R $USER:$USER ~/.ssh
systemctl restart sshd

Option 2: echo your key into authorized_keys

sed -ri '/\#\s?PermitRootLogin prohibit-password\s?/Id' /etc/ssh/sshd_config
sed -ri 's/PermitRootLogin yes\s?/PermitRootLogin prohibit-password/gI' /etc/ssh/sshd_config
sed -ri 's/PasswordAuthentication yes\s?/PasswordAuthentication no/gI' /etc/ssh/sshd_config
sed -ri 's/#PasswordAuthentication yes\s?/PasswordAuthentication no/gI' /etc/ssh/sshd_config
mkdir ~/.ssh
echo "PASTE YOUR PUBLIC KEY HERE" > ~/.ssh/authorized_keys
chmod -R go= ~/.ssh
chown -R $USER:$USER ~/.ssh
systemctl restart sshd