Available in VPC
Get the admin password using the authentication key of a server instance (VM).
Syntax
The getRootPassword syntax is as follows:
./ncloud vserver getRootPassword \
--serverInstanceNo <server-instance-no> \
--privateKey <private-key> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running getRootPassword.
Required options
The following options are required for getRootPassword.
| Options | Type | Required | Description |
|---|---|---|---|
--serverInstanceNo |
String | Required | Server instance number |
--privateKey |
String | Required | Authentication key (private key)
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
Examples
If the request to retrieve the admin password is successful, the decrypted admin password is returned.
Command
The command example is as follows:
./ncloud vserver getRootPassword \
--serverInstanceNo 34567890 \
--privateKey "file://path/to/key.pem" \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"getRootPasswordResponse": {
"rootPassword": "<root-password-redacted>",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"returnCode": "0",
"returnMessage": "success"
}
}