Before You Begin
This 10-minute tutorial shows you how to add a public key pair to an Oracle Public Cloud Service instance.
Most Oracle Public Cloud services provide their services with VMs that users can access through a secure shell (SSH). For an SSH access, when you create your Oracle Public Cloud service, you associate a public key to your service instance.
The Oracle Public Cloud Service wizard can create a public/private key pair for you. In case you want to add or update a public/private key pair that is associated to your VM, you can do it through your Oracle Public Cloud Service's console page.
Some Oracle Public Cloud services such as Oracle Storage Cloud Service don't provide access to their VMs with Secure Shell. Instead you use REST API calls to access the service. This tutorial is for cloud services that allow SSH access to their VMs and therefore, they provide you a public/private key pair for SSH access.
What Do You Need?
- Access to an Oracle Public Cloud Service instance. For this tutorial, we use an Oracle GoldenGate Cloud Service instance.
Generate the Key Pair
It's best if you use the Oracle generated keys for Oracle cloud services to avoid format issues.
- Open the Service Console of your cloud service.
- On the Instances page, click Create Instance.
- On the Create Instance wizard page, enter the mandatory fields and click Next.
- On the Service Details page, click the Edit button next to the SSH Public Key field.
- In the SSH Public Key for Access to the Compute Nodes dialog box, select Create a New Key and click Enter.
- In the Download Keys dialog box, click Download.
- In the opening sshkeybundle.zip window, click Save File.
- Enter a meaningful name for your key bundle, browse to the location of your choice and save it, for example, as
- In the Download Keys dialog box, click Done.
- On the Create Instance wizard page, click Cancel to return to the Instances page.
- In your local filesystem, unzip the folder that contains the public/private key pair. For this example,
- Rename your public and private keys. For example, from privateKey and publicKey to:
Add the Key to Your Instance
- On the Service Console of your cloud service, identify the service instance for wich you want to update the associated public key, click the actions menu , and then select SSH Access.
- In the Add New Key dialog box, select Upload a New Public Key option and click Browse.
Note: The Key value field displays the current public key value that is associated with the VM of your service.
- Browse for you new public key and select it. For example, publicKey_Jack.
- After the new public key appears in the value field of the Upload a new SSH Public Key field, click Add New Key.
- In the Add New Key dialog box, confirm that you want to add the new key by clicking Submit.
Note: Your VM is restarted and then associated with the new public key. You'll need your matching private key, such as privateKey_Jack to access the VM for this service.