importLoginKey
    • PDF

    importLoginKey

    • PDF

    기사 요약

    개요

    로그인키 import

    설명

    서버인스턴스(VM)를 생성하고, 생성된 서버인스턴스(VM)에 접속 시 로그인키를 이용하여 비밀번호를 암호화 하고 복호화 하는 키를 생성합니다. 사용자가 직접 ssh-keygen 으로 생성한 public key 를 import 합니다.

    요청 파라미터

    파라미터명필수 여부타입제약사항설명
    keyNameYesStringMin:3, Max:30- 생성할 키 명
    이미 생성된 키명이 존재할 경우 오류 발생
    publicKeyYesString- import 할 공개키
    ssh-keygen -t rsa -C "my-key" -f ~/.ssh/my-key 로 생성한 public 키
    ex) ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfE6pQTOpsdQNsFtZpIzqDMyb8gH2XUUGe+9s8b36OO0i1
    ex) file://directory1/directory2/test.pub
    ex) https://kr.objectstorage.ncloud.com/bucket/test.pub

    응답 데이터 타입

    • LoginKeyList 타입
    LoginKeyList extends CommonResponse
    private String fingerprint;
    private String keyName;
    private String createDate;

    예시

    호출

    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
    

    응답

    {
      "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>
    

    이 문서가 도움이 되었습니까?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.