--- title: "createLoginKey" slug: "cli-vserver-server-loginkey-createloginkey" tags: ["VPC", "Server"] updated: 2026-09-17T10:08:33Z published: 2026-09-17T10:08:33Z canonical: "cli.ncloud-docs.com/cli-vserver-server-loginkey-createloginkey" --- > ## 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. # createLoginKey Available in VPC Create an authentication key (login key) to use when connecting to the server instance (VM) via SSH. Since the private key value is issued only once in the response and cannot be retrieved later, store it securely in a separate location. ## Syntax The `createLoginKey` syntax is as follows: ``` ./ncloud vserver createLoginKey \ [--keyName ] \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `createLoginKey`. ### Optional options These are the optional options for `createLoginKey`. 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 authentication key generation request is successful, the authentication key name and private key are returned. ### Command The command example is as follows: ``` ./ncloud vserver createLoginKey \ --keyName test-login-key-01 \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "createLoginKeyResponse": { "keyName": "test-login-key-01", "privateKey": "-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n", "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "returnCode": "0", "returnMessage": "success" } } ```