Managing Key Pairs

Defines the purpose of a key pair and lists the available operations for managing it.

A key pair provides credentials for user authentication for access to the guest operating system of a vServer

The APIs and CLI provide operations for:

Use either the cloud infrastructure API actions or the cloud infrastructure CLI command to perform these operations.

About Key Pairs

Describes the role of the key pair and its components.

The Web service authenticates access to vServers using key pairs for the accounts. A key pair is a public key stored in the application and a private key is provided to the account user. Key pairs are managed for each account and they are only visible as tags. The cloud user chooses the credentials before the vServer is created or run for the first time.

The key pair is typically an RSA 2048-bit key. If a different key pair strength is required, use the Import Key Pair action.

Creating a Key Pair

Lists the API action and CLI command for creating a key pair.

A cloud user can create a key pair in the RSA 2048 format to be associated with a vServer as part of the create vServer operation. If a different key pair strength is required, use the Import Key Pair action.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

RegisterKeyPairRequest

iaas-create-key-pair


Example 3-83 Creating a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterKeyPair&Version=1&Timestamp=1318279380444&Expires=1318279680444&publicKey=ssh-rsa+AAAAB3NzaC1yc2EAAAADAQABAAABAQDg2eienGE4vEMSMcVMbYbC8z2q%2Fvhz3H6AanlJ6B4udseK%0A8CpaHJ23eGWcjcgAmuZCJ%2FOoHUA2dN2PNPuK6g%2BZndR8wVaaQT89eWDZx9oaf0%2F2Eg%2FLeKJ3moVH%0AvIYvFB9aFCpa4H%2BOmLfM%2FmfQ4CYeDfo0r0jxCCB0YLo0876LQqK5X%2BtgRXwbAbPH2Mzbzp%2FzzdkQ%0ArsBqSgUQ%2B1V4LkN6TQe06P5a2QYIlUhRXwUorTnbXczGq9zEJJ7ef%2F74xIQZfAipkYkyGgktsXrM%0A%2F%2Bs789v9ipaDB5B26y3aqjIdvW4ZLDvuGXPs60aiUfj2WGIqx0KSVL%2FyB%2FtK1WbuZYwl+IaaS-Generated&keyName=myKeyPairK&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-84 Creating a key pair using the Cloud Infrastructure CLI

iaas-create-key-pair --base-url https://<EnterpriseControllerHostname>/ -a ak.file --key-name myKeyPair --key-file myKeyFile

Importing a Key Pair

Lists the API action and CLI command for importing a key pair.

A cloud user can import a public key pair that was created with a third-party tool using the RSA encryption algorithm. The length of the formatted key string is limited to 2048 characters.

When importing a key pair, the cloud user supplies the file that stores the public key and then the public key is registered. The cloud user must manages the private key.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

ImportKeyPairRequest,

RegisterKeyPairRequest

iaas-import-key-pair


Example 3-85 Importing a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=RegisterKeyPair&Version=1&Timestamp=1324421510757&Expires=1324421810757&publicKey=ssh-rsa+AAAAB3NzaC1yc2EAAAABIwAAAQEAtJnFD8INGLtM%2FQIlxkDjh4t2R4%2FtTMpUDzMIRP%0A&keyName=myKeyPair&AccessKeyId=AK_1&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-86 Importing a key pair using the Cloud Infrastructure CLI

iaas-import-key-pair --base-url https://<EnterpriseControllerHostname>/ -a ak.file --key-name myOtherPair --key-file myOtherPair.key

Deleting a Key Pair

Lists the API action and CLI command for deleting a key pair.

A cloud user can delete a key pair from an account. When a key pair is deleted, the public key registered in the application is deleted and no longer valid.


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

DeleteKeyPairRequest

iaas-delete-key-pair


Example 3-87 Deleting a key pair using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DeleteKeyPair&Version=1&Timestamp=1318281994430&Expires=1318282294430&keyName=myKeyPair&AccessKeyId=AK_3&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-88 Deleting a key pair using the Cloud Infrastructure CLI

iaas-delete-key-pair --base-url https://<EnterpriseControllerHostname>/ --access-key-file ak.file --key-name myKeyPairName

Viewing Key Pair Information

Lists the API action and CLI command for displaying a key pair.

A cloud user can get information about the existing key pairs in an account. The cloud user can restrict the key pairs included in the result by specifying filters. The result includes the name and fingerprint for each key pair found.

The cloud infrastructure API action and the cloud infrastructure CLI command required to view information about a key pair are:


Cloud Infrastructure API Action Cloud Infrastructure CLI Command

DescribeKeyPairsRequest

iaas-describe-key-pairs


Example 3-89 Viewing key pair information using the Cloud Infrastructure API

https://<EnterpriseControllerHostname>/iaas/?Action=DescribeKeyPairs&Version=1&Timestamp=1320361610130&Expires=1320361910130&AccessKeyId=AK_32&Signature=SIGNATURE_HAS_BEEN_REMOVED_FOR_THE_READABILITY_OF_THE_REQUEST&SignatureMethod=SHA512withRSA&SignatureVersion=1

Example 3-90 Viewing key pair information using the Cloud Infrastructure CLI

iaas-describe-key-pairs --base-url https://<EnterpriseControllerHostname>/ -a ak.file