importLoginKey

Prev Next

Can be used in a VPC environment.

Overview

This creates the key that encrypts and decrypts the password using the login key when connecting to the server instance (VM).
This imports the public key that the user personally created with ssh-keygen.

Request

Request parameter

Parameter Name Required Status Type Restrictions Description
regionCode No String - Region code
regionCode can be acquired through getRegionList action
Default: select the first region shown through getRegionList
keyName No List<String> Min : 3, Max : 30
Only English, numbers, and special characters "-" are allowed, and it must start with English.
It must end with an alphabet letter or number.
The key name to be created
Default: NAVER Cloud Platform automatically assigns it.
publicKey Yes String Open key to be imported
Public key created with ssh-keygen -t rsa -C "key-name" -f ~/.ssh/key-name
The following options may be required, depending on the ssh-keygen version. (-b 2048 -m PEM)
responseFormatType No String Format type for the response result
Options : xml | json
Default : xml

Response

Response data type

  • LoginKeyList type
LoginKeyList extends CommonResponse
private Integer totalRows;
private List<LoginKey> loginKeyList = new ArrayList<>();
LoginKey
private String fingerprint;
private String keyName;
private Date createDate;

Example

Request example

ncloud vserver importLoginKey --keyName test-*** --publicKey "ssh-rsa ***AB3NzaC1yc2EAAAADAQABAAABAQCuEQI1uBEIvNyx/VxHmYtypM1p7yvzL6bqItyeZI/h2y5u06gsiiEztyBj4WABURbGoYHBaUCGJUjevpZpv7Tn8ZaZhdPbvKixy4QS8hMdamn0/iFoHHS6FNIwEdMwYbQcLOt/XMBMho4E3JZLNo91pMb/yHHqmezL6Bz0J0JVKZ1Bb7Fp7Qshc//+9PX9ZZJrn8+tDCAgRSvPenL220iirSevBOXfniCOdYEzZBY9/DgBc2TarMAS+JQEnJG525GjL1N+kWPezp6PBYQQBVFRFXjxq8TckDVaIqYFiT7uISnBudQir+fn4OwpVIGrdHtlq1+PnIjm34i50moqn*** test-***"

Response example

<importLoginKeyResponse>
  <requestId>46b585b6-fb86-4cea-8913-9552e6cb8cce</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <loginKeyList>
    <loginKey>
      <fingerprint>-</fingerprint>
      <keyName>test-***</keyName>
      <createDate>2020-08-11T11:47:34+0900</createDate>
    </loginKey>
  </loginKeyList>
</importLoginKeyResponse>