Caution
Only do this AFTER you verified you can authenticate with you SSH key.
Open the config file:
sudo nano /etc/ssh/sshd_config
Uncomment and edit these two lines
PasswordAuthentication no
PubkeyAuthentication yes
Restart SSH service
sudo systemctl restart ssh
Quick check
grep -E "^\s*((PasswordAuthentication)|(PubkeyAuthentication))" /etc/ssh/sshd_config