本篇文章给大家带来的内容是关于导入由其他工具产生的 rsa 密钥对的公钥部分,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
ImportKeyPair
导入由其他工具产生的 RSA 密钥对的公钥部分。导入密钥对后,我们会为您保管公钥部分,您需要自行妥善保存密钥对的私钥部分。
描述
调用该接口时,您需要注意:
您在每个地域的密钥对数最高为 500 对。
导入的密钥对的必须支持下列任一种加密方式:
rsa
dsa
ssh-rsa
ssh-dss
ecdsa
ssh-rsa-cert-v00@openssh.com
ssh-dss-cert-v00@openssh.com
ssh-rsa-cert-v01@openssh.com
ssh-dss-cert-v01@openssh.com
ecdsa-sha2-nistp256-cert-v01@openssh.com
ecdsa-sha2-nistp384-cert-v01@openssh.com
ecdsa-sha2-nistp521-cert-v01@openssh.com
请求参数

返回参数

示例
请求示例
https://ecs.aliyuncs.com/?Action=ImportKeyPair &RegionId=cn-qingdao &PublicKeyBody=xxxxxxxxxxxxxx &KeyPairName=test &<公共请求参数>
返回示例
XML 格式
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E test 89:f0:ba:62:ac:b8:aa:e1:61:5e:fd:81:69:86:6d:6b:f0:c0:5a:d7
JSON 格式
{
"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"
}错误码
以下为本接口特有的错误码。更多错误码,请访问 API 错误中心。









