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 <public-key> \
[--keyName <key-name>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
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
|
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
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
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"
}
}