---
title: "getRootPassword"
slug: "cli-server-getrootpassword"
updated: 2026-04-23T08:56:57Z
published: 2026-04-23T08:58:53Z
canonical: "cli.ncloud-docs.com/cli-server-getrootpassword"
---

> ## 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.

# getRootPassword

## 개요<a name="개요"></a>

서버의 root 계정의 비밀번호 조회

## 설명 <a name="설명"></a>

서버(VM)의 로그인키로 root 계정의 비밀번호를 조회합니다.

## 요청 파라미터 <a name="요청파라미터"></a>

| 파라미터 명      | 필수   여부 | 타입   | 제약사항 | 설명                                                         |
| ---------------- | ----------- | ------ | -------- | ------------------------------------------------------------ |
| serverInstanceNo | Yes         | String |          | root 패스워드를 조회할 서버의 인스턴스 번호                  |
| privateKey       | Yes         | String |          | - 서버 생성시 적용한 로그인키<br>인증키가 저장된 경로를 받음<br>        * 입력된 Key값은 네트워크로 전송되지 않음<br>        ex)   file://directory1/directory2/*.pem<br>        ex)https://kr.objectstorage.ncloud.com/bucket/penguin.pem|

## 응답 데이터 타입 <a name="응답데이터타입"></a>
- RootPassword 타입

| RootPassword extends CommonResponse |
| ----------------------------------- |
| private String rootPassword;        |

## 예시 <a name="예시"></a>

### 호출 <a name="호출"></a>

```
ncloud server getRootPassword --serverInstanceNo 475081 --privateKey file:///C:/Users/Naver/.ncloud/penguin.pem
```
```
ncloud server getRootPassword --serverInstanceNo 475081 --privateKey https://kr.objectstorage.ncloud.com/chungsoo/penguin.pem
```
```
ncloud server getRootPassword --serverInstanceNo 475081 --privateKey "-----BEGIN RSA PRIVATE KEY-----
MIIG5AIBAAKCAYEA1LgE/8sxb8ueSrwXzHp0vgrJHgNz+XwWpvQIK0Xx0j/5IWez
************************************************
************************************************
+5/QANMPYF94e8xtIpblYh965zNGI0h5TzjR3QOX2qKSBsriQ0Xw+A==
-----END RSA PRIVATE KEY-----"
```

### 응답 <a name="응답"></a>
 
```json
{
  "getRootPasswordResponse": {
    "requestId": "f76f5042-cd8f-4ad2-b2fe-be556bbb6bfb",
    "returnCode": 0,
    "returnMessage": "success",
    "rootPassword": "A7TFYc+hRy"
  }
}
```
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<getRootPasswordResponse>
  <requestId>f76f5042-cd8f-4ad2-b2fe-be556bbb6bfb</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <rootPassword>A7TFYc+hRy</rootPassword>
</getRootPasswordResponse>
```
