File: cloud-create-api-keypair.dita

package info (click to toggle)
virtualbox 7.2.2-dfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 616,072 kB
  • sloc: cpp: 2,377,613; ansic: 2,351,258; asm: 379,359; python: 233,965; xml: 89,678; sh: 25,697; makefile: 8,169; perl: 5,697; java: 5,337; cs: 4,872; pascal: 1,785; javascript: 1,692; objc: 1,131; lex: 931; sed: 921; php: 906; yacc: 707
file content (46 lines) | stat: -rw-r--r-- 2,489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="cloud-create-api-keypair">
  <title>Creating an API Signing Key Pair</title>
  
  <body>
    <p>To use the cloud integration features of <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, you must generate an API signing key pair that is used for API requests to <ph conkeyref="vbox-conkeyref-phrases/oci"/>.</p>
    <p>Your API requests are signed with your private key, and <ph conkeyref="vbox-conkeyref-phrases/oci"/> uses the public key to verify the authenticity of the request. You must upload the public key to the <ph conkeyref="vbox-conkeyref-phrases/oci"/> Console.</p>
    <note>
      <p> This key pair is not the same SSH key that you use to access compute instances on <ph conkeyref="vbox-conkeyref-phrases/oci"/>.</p>
    </note>
    <ol>
      <li>
        <p>(Optional) Create a <filepath>.oci</filepath> directory to store the key pair.</p>
        <pre xml:space="preserve">$ mkdir ~/.oci</pre>
        <p>The key pair is usually installed in the <filepath>.oci</filepath> folder in your home directory. For example, <filepath>~/.oci</filepath> on a Linux system.</p>
      </li>
      <li>
        <p>Generate the private key. </p>
        <p>Use the <codeph>openssl</codeph> command.</p>
        <ul>
          <li>
            <p> To generate a private key with a passphrase (prompt for passphrase):</p>
            <pre xml:space="preserve">$ openssl genrsa -out ~/.oci/oci_api_key.pem -aes256 2048 </pre>
          </li>
          <li>
            <p> To generate a private key with a passphrase entered on the command line as an argument:</p>
            <pre xml:space="preserve">$ openssl genrsa -aes256 -passout pass:user_passphrase -out ~/.oci/oci_api_key.pem 2048</pre>
          </li>
          <li>
            <p> To generate a private key without a passphrase:</p>
            <pre xml:space="preserve">$ openssl genrsa -out ~/.oci/oci_api_key.pem 2048</pre>
          </li>
        </ul>
      </li>
      <li>
        <p>Change permissions for the private key.</p>
        <pre xml:space="preserve">$ chmod 600 ~/.oci/oci_api_key.pem</pre>
        <p>Generate the public key.</p>
        <pre xml:space="preserve">$ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem</pre>
        <p>Enter the passphrase when prompted, if you set one.</p>
      </li>
    </ol>
  </body>
  
</topic>