Home  >  Article  >  Operation and Maintenance  >  How to call CreateKeyPair to create an SSH key pair

How to call CreateKeyPair to create an SSH key pair

坏嘻嘻
坏嘻嘻Original
2018-09-25 15:28:492322browse

This article introduces how to call CreateKeyPair to create a pair of SSH key pairs, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something.

CreateKeyPair

Create an SSH key pair. We store the public portion of the key for you and return the unencrypted PEM-encoded private key in PKCS#8 format. You need to keep your private key properly. For more details, see SSH Key Pairs.

Description

In addition to calling CreateKeyPair to create a key pair, you can also use a third-party tool to create a key pair and then upload it ( ImportKeyPair) to an Alibaba Cloud region, and its usage is consistent with the key pair we created for you.

The maximum number of key pairs you have in each region is 500.

Request parameters

How to call CreateKeyPair to create an SSH key pair

##Return parameters

How to call CreateKeyPair to create an SSH key pair

Example

Request Example

https://ecs.aliyuncs.com/?Action=CreateKeyPair
&RegionId=cn-qingdao
&KeyPairName=test
&<公共请求参数>

Return example

XML format

<CreateKeyPairResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
    <KeyPairName>test</KeyPairName>
    <KeyPairFingerPrint>89:f0:ba:62:ac:b8:aa:e1:61:5e:fd:81:69:86:6d:6b:f0:c0:5a:d7</KeyPairFingerPrint>
    <PrivateKeyBody>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</PrivateKeyBody>
</CreateKeyPairResponse>

JSON format

{
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
    "KeyPairName": "test"
    "KeyPairFingerPrint": "89:f0:ba:62:ac:b8:aa:e1:61:5e:fd:81:69:86:6d:6b:f0:c0:5a:d7"
    "PrivateKeyBody": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to call CreateKeyPair to create an SSH key pair

The above is the detailed content of How to call CreateKeyPair to create an SSH key pair. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn