1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="cloud-create-api-keypair">
|
---|
4 | <title>Creating an API Signing Key Pair</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>To use the cloud integration features of <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, you must generate
|
---|
8 | an API signing key pair that is used for API requests to <ph conkeyref="vbox-conkeyref-phrases/oci"/>. </p>
|
---|
9 | <p>Your API requests are signed with your private key, and <ph conkeyref="vbox-conkeyref-phrases/oci"/> uses the
|
---|
10 | public key to verify the authenticity of the request. You must upload the public key to the <ph
|
---|
11 | conkeyref="vbox-conkeyref-phrases/oci"/> Console. </p>
|
---|
12 | <note>
|
---|
13 | <p>
|
---|
14 | This key pair is not the same SSH key that you use to access
|
---|
15 | compute instances on <ph conkeyref="vbox-conkeyref-phrases/oci"/>.
|
---|
16 | </p>
|
---|
17 | </note>
|
---|
18 | <ol>
|
---|
19 | <li>
|
---|
20 | <p>(Optional) Create a <filepath>.oci</filepath> directory to store the key pair. </p>
|
---|
21 | <pre xml:space="preserve">$ mkdir ~/.oci</pre>
|
---|
22 | <p>The key pair is usually installed in the <filepath>.oci</filepath> folder in your home directory. For
|
---|
23 | example, <filepath>~/.oci</filepath> on a Linux system. </p>
|
---|
24 | </li>
|
---|
25 | <li>
|
---|
26 | <p>Generate the private key. </p>
|
---|
27 | <p>Use the <codeph>openssl</codeph> command. </p>
|
---|
28 | <ul>
|
---|
29 | <li>
|
---|
30 | <p> To generate a private key with a passphrase (prompt for passphrase): </p>
|
---|
31 | <pre xml:space="preserve">$ openssl genrsa -out ~/.oci/oci_api_key.pem -aes256 2048 </pre>
|
---|
32 | </li>
|
---|
33 | <li>
|
---|
34 | <p> To generate a private key with a passphrase entered on the command line as an argument:</p>
|
---|
35 | <pre xml:space="preserve">$ openssl genrsa -aes256 -passout pass:user_passphrase -out ~/.oci/oci_api_key.pem 2048</pre>
|
---|
36 | </li>
|
---|
37 | <li>
|
---|
38 | <p>
|
---|
39 | To generate a private key without a passphrase:
|
---|
40 | </p>
|
---|
41 | <pre xml:space="preserve">$ openssl genrsa -out ~/.oci/oci_api_key.pem 2048</pre>
|
---|
42 | </li>
|
---|
43 | </ul>
|
---|
44 | </li>
|
---|
45 | <li>
|
---|
46 | <p>Change permissions for the private key. </p>
|
---|
47 | <pre xml:space="preserve">$ chmod 600 ~/.oci/oci_api_key.pem</pre>
|
---|
48 | <p>Generate the public key. </p>
|
---|
49 | <pre xml:space="preserve">$ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem</pre>
|
---|
50 | <p>Enter the passphrase when prompted, if you set one.</p>
|
---|
51 | </li>
|
---|
52 | </ol>
|
---|
53 | </body>
|
---|
54 |
|
---|
55 | </topic>
|
---|