SSH keys are used for passwordless access to instances. Before creating any instance, you must generate an SSH key pair and upload the SSH public key that must be associated with the instance.
Use the following command to add an SSH public key:
oracle-compute add sshkey keyname keyfile [--enabled] [--osuser]
You can associate the SSH key with the operating system user; the SSH public key is appended to the users’ authorized keys file /home/<osuser>/.ssh/authorized_keys
For more information, see CLI Reference for Oracle Compute Cloud Service.
To add an SSH Key using the API, use the POST https://api.oc.example.com/sshkey/
method.
For more information, see REST API Reference for Oracle Compute Cloud Service.