To add an SSH key, log in to your server as root, and run:
nano -w .ssh/authorized_keys
Next, paste the key and type "ctrl + x" to exit, "y" to save, and then press enter.