importLoginKey
- Print
- PDF
importLoginKey
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Import a login key
Description
Create a server instance (VM) and delete keys which encode or decode passwords using login keys when you access the created server instance. The user directly imports the public key generated by ssh-keygen.
Request Parameters
Parameter Name | Requiredness | Type | Limitation | Description |
---|---|---|---|---|
keyName | Yes | String | Min:3, Max:30 | Key name to create If there already exists a key name, an error may occur. |
publicKey | Yes | String | The public key to import The public key generated by ssh-keygen -t rsa -C "my-key" -f ~ / .ssh / my-key ex) ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfE6pQTOpsdQNsFtZpIzqDMyb8gH2XUUGe+9s8b36OO0i1 ex) file://directory1/directory2/test.pub ex) https://kr.objectstorage.ncloud.com/bucket/test.pub |
Response Data Type
- LoginKeyList type
LoginKeyList extends CommonResponse |
---|
private String fingerprint; |
private String keyName; |
private String createDate; |
Examples
Request
ncloud server importLoginKey --keyName ncloudTest --publicKey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfE6pQTOpsdQNsFtZpIzqDMyb8gH2XUUGe+9s8b36OO0i1SXkO8+u3/4EXYdujjIH+EKb9LzMiAXOtEUX0hI+zAlJemE+sBKPTORBb+YjLvBYb99ts3pdd7x1S/dgksyxdC6ru8KNS7heU0fARZGhCXmzI9Z6PhSqFMNQcUq14UYLNHUJYshuqHv/sjCBt3QgpMLcaBmgl6TLfdq7ZW0G/iz6V1a2q200A+Fq8Yuc0JLz6Q/xQqWi1+ehKs5y3Ow3D08NLwj8Ay/7eIXqk40oo+GqkQSVWIFV3lzJXB4Po10ZRC67RdCnyf8fYbZYzYP6trr/hItvmXDryEKFUnJgZ"
ncloud server importLoginKey --keyName ncloudTest --publicKey file://directory1/directory2/test.pub
ncloud server importLoginKey --keyName ncloudTest --publicKey https://kr.objectstorage.ncloud.com/bucket/test.pub
Response
{
"importLoginKeyResponse": {
"requestId": "7f7c33d6-ce42-40c0-81a8-7df102c71d41",
"returnCode": "0",
"returnMessage": "success",
"totalRows": 1,
"loginKeyList": [
{
"fingerprint": "-",
"keyName": "ncloud-import-key1",
"createDate": "2018-06-26T17:54:47+0900"
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<importLoginKeyResponse>
<requestId>7f7c33d6-ce42-40c0-81a8-7df102c71d41</requestId>
<returnCode>0</returnCode>
<returnMessage>success</returnMessage>
<totalRows>1</totalRows>
<loginKeyList>
<fingerprint>-</fingerprint>
<keyName>ncloud-import-key1</keyName>
<createDate>2018-06-26T17:54:47+0900</createDate>
</loginKeyList>
</importLoginKeyResponse>
Was this article helpful?