You can use authorized keys to log in to a host with SSH. Authorized keys allow you to authenticate remote access to a host.
When users or scripts try to access a host with SSH, the key provides authentication without a password.
With authorized keys you can automate authentication, which is useful when you write scripts to perform routine tasks.
curl https://[HOSTNAME]/host/ssh_root_authorized_keys --insecure -u "[USERNAME]:[PASSWORD]" --upload-file authorized_keys
Reference: Upload an SSH Key Using HTTPS PUT