--- title: "importLoginKey" slug: "cli-vserver-server-loginkey-importloginkey" tags: ["VPC", "Server"] updated: 2026-09-17T10:08:33Z published: 2026-09-17T10:08:33Z canonical: "cli.ncloud-docs.com/cli-vserver-server-loginkey-importloginkey" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # importLoginKey Available in VPC Create an authentication key (login key) using a public key that the user created with ssh-keygen. ## Syntax The `importLoginKey` syntax is as follows: ``` ./ncloud vserver importLoginKey \ --publicKey \ [--keyName ] \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `importLoginKey`. ### Required options The following options are required for `importLoginKey`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--publicKey` | String | Required | Public key - Publick key created with `ssh-keygen -t rsa -C "key-name" -f ~/.ssh/key-name`. - `-b 2048 -m PEM` option is needed depending on the ssh-keygen version. | ### Optional options These are the optional options for `importLoginKey`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--keyName` | String | Optional | Authentication key name - Automatically generated if not entered. - Enter 3-30 characters using a combination of lowercase English letters, numbers, and special character `-`. - The string must start with a lowercase English letter and end with a lowercase English letter or a number. | ### Common options For information about the options common to all `vserver` subcommands, see [Server (VPC) options](/docs/en/cli-vserver#%EC%98%B5%EC%85%98). ## Examples If the request to import the authentication key is successful, the name and creation date of the registered authentication key are returned. ### Command The command example is as follows: ``` ./ncloud vserver importLoginKey \ --publicKey "ssh-rsa AAAAB3Nz...test-import-key-01" \ --keyName test-import-key-01 \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "importLoginKeyResponse": { "loginKeyList": [ { "fingerprint": "", "keyName": "test-import-key-01", "createDate": "2026-05-14T08:24:14+0900" } ], "requestId": "b2c3d4e5-f678-9012-bcde-f23456789012", "returnCode": "0", "returnMessage": "success" } } ```