

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# CLI 명령 구문
<a name="cli-command-syntax"></a>

다음 구문을 사용하여 CLI 명령을 사용할 수 있습니다.

```
aws-vpn-client <COMMAND> [OPTIONS]
```

CLI 도구는 다음 명령을 지원합니다.

```
Usage: aws-vpn-client <COMMAND>

Commands:
  connect                Connect a profile through the AWS VPN Client
  disconnect             Disconnect a profile from the AWS VPN Client
  delete-profile         Delete a profile from the AWS VPN Client
  import-profile         Import a VPN connection profile
  list-profiles          List all VPN profiles
  get-config             Get configuration for a profile
  put-preference         Put a preference value
  list-preferences       List all preferences
  get-connection-status  Get the current connection status for a VPN profile
  list-connections       List all active VPN connections
  send-diagnostic-logs   Send diagnostic logs to AWS for troubleshooting
  help                   Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
```

## 연결
<a name="cli-cmd-connect"></a>

### 설명
<a name="cli-cmd-connect-description"></a>

프로필에 대한 VPN 연결을 설정합니다.

### 시놉시스
<a name="cli-cmd-connect-synopsis"></a>

```
aws-vpn-client connect
  --profile-name <PROFILE>
  [--auth-user-pass <AUTH_USER_PASS>]
```

### 옵션
<a name="cli-cmd-connect-options"></a>

`--profile-name`(문자열)  
연결할 프로필의 이름입니다. 이 옵션은 필수입니다.

`--auth-user-pass`(문자열)  
사용자 이름(1행), 암호(2행) 및 선택적 MFA 코드(3행)가 포함된 파일의 경로입니다. 이 옵션은 필요하지 않습니다.

### 예제
<a name="cli-cmd-connect-examples"></a>

**예: VPN 프로필에 연결**

다음 `connect` 예제에서는 프로파일에 대한 VPN 연결을 설정합니다.

```
aws-vpn-client connect --profile-name "Production-VPN"
```

출력:

```
{
  "status": "Connected"
}
```

## 연결 해제
<a name="cli-cmd-disconnect"></a>

### 설명
<a name="cli-cmd-disconnect-description"></a>

활성 VPN 연결을 종료합니다.

### 시놉시스
<a name="cli-cmd-disconnect-synopsis"></a>

```
aws-vpn-client disconnect
  --profile-name <PROFILE_NAME>
```

### 옵션
<a name="cli-cmd-disconnect-options"></a>

`--profile-name`(문자열)  
연결 해제할 연결된 프로필의 이름입니다. 이 옵션은 필수입니다.

### 예제
<a name="cli-cmd-disconnect-examples"></a>

**예: VPN 프로파일에서 연결 해제**

다음 `disconnect` 예시에서는 VPN 연결을 종료합니다. 성공에 대한 출력이 없습니다.

```
aws-vpn-client disconnect --profile-name "Production-VPN"
```

**예: 연결 해제 오류**

다음 `disconnect` 예제에서는 프로파일이 연결되지 않은 경우의 오류를 보여줍니다.

```
aws-vpn-client disconnect --profile-name "Production-VPN"
```

출력:

```
{
  "status": "Error",
  "message": "Profile is not connected"
}
```

## import-profile
<a name="cli-cmd-import-profile"></a>

### 설명
<a name="cli-cmd-import-profile-description"></a>

VPN 연결 프로필을 가져옵니다.

### 시놉시스
<a name="cli-cmd-import-profile-synopsis"></a>

```
aws-vpn-client import-profile
  --profile-name <PROFILE_NAME>
  --config-path <CONFIG_PATH>
  [--global]
```

### 옵션
<a name="cli-cmd-import-profile-options"></a>

`--profile-name`(문자열)  
가져온 프로필의 사용자 지정 이름입니다. 이 옵션은 필수입니다.

`--config-path`(문자열)  
OpenVPN 구성 파일(.ovpn)의 경로입니다. 이 옵션은 필수입니다.

`--global`(부울)  
모든 사용자가 사용할 수 있는 글로벌 프로필로를 가져옵니다. 이 옵션에는 관리자 권한이 필요합니다.

### 예제
<a name="cli-cmd-import-profile-examples"></a>

**예: 프로필 가져오기**

다음 `import-profile` 예시에서는 VPN 연결 프로파일을 가져옵니다.

```
aws-vpn-client import-profile --profile-name "Production-VPN" --config-path /path/to/vpn-config.ovpn
```

출력:

```
{
  "status": "Success"
}
```

**예: 글로벌 프로필 가져오기**

다음 `import-profile` 예시에서는 글로벌 프로필을 가져옵니다. 여기에는 관리자 권한이 필요합니다.

```
sudo aws-vpn-client import-profile --profile-name "Company-VPN" --config-path /path/to/config.ovpn --global
```

출력:

```
{
  "status": "Success"
}
```

**예: 잘못된 파일 경로의 가져오기 오류**

다음 `import-profile` 예제에서는 구성 파일을 찾을 수 없을 때 발생하는 오류를 보여줍니다.

```
aws-vpn-client import-profile --profile-name "test" --config-path /invalid/path.ovpn
```

출력:

```
{
  "status": "Error",
  "message": "Failed to read OpenVPN config file: No such file or directory (os error 2)"
}
```

## delete-profile
<a name="cli-cmd-delete-profile"></a>

### 설명
<a name="cli-cmd-delete-profile-description"></a>

클라이언트에서 프로필을 삭제합니다.

### 시놉시스
<a name="cli-cmd-delete-profile-synopsis"></a>

```
aws-vpn-client delete-profile
  --profile-name <PROFILE_NAME>
```

### 옵션
<a name="cli-cmd-delete-profile-options"></a>

`--profile-name`(문자열)  
삭제할 프로필의 이름입니다. 이 옵션은 필수입니다.

### 예제
<a name="cli-cmd-delete-profile-examples"></a>

**예: 프로필 삭제**

다음 `delete-profile` 예시에서는 VPN 프로필을 삭제합니다. 성공에 대한 출력이 없습니다.

```
aws-vpn-client delete-profile --profile-name "Production-VPN"
```

**예: 프로파일이 존재하지 않는 삭제 오류**

다음 `delete-profile` 예제에서는 프로파일이 없는 경우의 오류를 보여줍니다.

```
aws-vpn-client delete-profile --profile-name "nonexistent"
```

출력:

```
{
  "status": "Error",
  "message": "Profile not found"
}
```

## list-profiles
<a name="cli-cmd-list-profiles"></a>

### 설명
<a name="cli-cmd-list-profiles-description"></a>

모든 VPN 프로필을 나열합니다.

### 시놉시스
<a name="cli-cmd-list-profiles-synopsis"></a>

```
aws-vpn-client list-profiles
```

### 예제
<a name="cli-cmd-list-profiles-examples"></a>

**예: 모든 VPN 프로필 나열**

다음 `list-profiles` 예시에서는 가져온 모든 VPN 프로필을 나열합니다.

```
aws-vpn-client list-profiles
```

출력:

```
[
  {
    "profile-name": "Production-VPN",
    "owned-by": "jdoe",
    "auth-type": "saml",
    "imported-at": "2026-07-21T13:04:42-07:00"
  },
  {
    "profile-name": "Staging-VPN",
    "owned-by": "jdoe",
    "auth-type": "ma",
    "imported-at": "2026-07-22T10:30:00-07:00"
  }
]
```

**참고**  
글로벌 프로필(로 가져오기`--global`)에는 `owned-by` 필드가 없습니다.

## get-config
<a name="cli-cmd-get-config"></a>

### 설명
<a name="cli-cmd-get-config-description"></a>

프로필에 대한 OpenVPN 구성을 검색합니다.

### 시놉시스
<a name="cli-cmd-get-config-synopsis"></a>

```
aws-vpn-client get-config
  --profile-name <PROFILE_NAME>
```

### 옵션
<a name="cli-cmd-get-config-options"></a>

`--profile-name`(문자열)  
구성을 검색할 프로필의 이름입니다. 이 옵션은 필수입니다.

### 예제
<a name="cli-cmd-get-config-examples"></a>

**예: OpenVPN 구성 검색**

다음 `get-config` 예시에서는 프로파일에 대한 OpenVPN 구성을 검색합니다.

```
aws-vpn-client get-config --profile-name "Production-VPN"
```

출력:

```
client
dev tun
proto udp
remote cvpn-endpoint-0123456789abcdef0.prod.clientvpn.us-east-1.amazonaws.com 443
remote-random-hostname
resolv-retry infinite
nobind
remote-cert-tls server
cipher AES-256-GCM
verb 3
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
auth-user-pass
reneg-sec 0
```

## get-connection-status
<a name="cli-cmd-get-connection-status"></a>

### 설명
<a name="cli-cmd-get-connection-status-description"></a>

VPN 프로필의 현재 연결 상태를 가져옵니다.

### 시놉시스
<a name="cli-cmd-get-connection-status-synopsis"></a>

```
aws-vpn-client get-connection-status
  --profile-name <PROFILE_NAME>
  [--show-details]
```

### 옵션
<a name="cli-cmd-get-connection-status-options"></a>

`--profile-name`(문자열)  
연결 상태를 검색할 프로필의 이름입니다. 이 옵션은 필수입니다.

`--show-details`(부울)  
출력에 연결 바이트 통계를 포함합니다.

### 예제
<a name="cli-cmd-get-connection-status-examples"></a>

**예: 연결 상태 가져오기**

다음 `get-connection-status` 예시에서는 프로파일의 연결 상태를 검색합니다.

```
aws-vpn-client get-connection-status --profile-name "Production-VPN"
```

출력:

```
{
  "connection-status": "Connected",
  "latest-connection-attempt": {
    "initiated-by": "jdoe",
    "updated-at": "2026-07-24T15:50:36-07:00"
  }
}
```

**예: 세부 정보가 포함된 연결 상태 가져오기**

다음 `get-connection-status` 예제에서는 `--show-details` 옵션을 사용하여 바이트 통계를 포함합니다.

```
aws-vpn-client get-connection-status --profile-name "Production-VPN" --show-details
```

출력:

```
{
  "connection-status": "Connected",
  "latest-connection-attempt": {
    "initiated-by": "jdoe",
    "updated-at": "2026-07-24T15:50:36-07:00",
    "details": {
      "tunnel-bytes-in": 0,
      "tunnel-bytes-out": 0,
      "transport-bytes-in": 9674,
      "transport-bytes-out": 11413
    }
  }
}
```

## list-connections
<a name="cli-cmd-list-connections"></a>

### 설명
<a name="cli-cmd-list-connections-description"></a>

모든 활성 VPN 연결을 나열합니다.

### 시놉시스
<a name="cli-cmd-list-connections-synopsis"></a>

```
aws-vpn-client list-connections
```

### 예제
<a name="cli-cmd-list-connections-examples"></a>

**예: 활성 연결 나열**

다음 `list-connections` 예시에서는 모든 활성 VPN 연결을 나열합니다.

```
aws-vpn-client list-connections
```

출력:

```
[
  {
    "profile-name": "Production-VPN",
    "initiated-by": "jdoe",
    "connection-status": "Connected",
    "last-updated-at": "2026-07-24T15:50:36-07:00"
  }
]
```

**예: 활성 연결 없음**

다음 `list-connections` 예제에서는 활성 연결이 없는 경우의 출력을 보여줍니다.

```
aws-vpn-client list-connections
```

출력:

```
[]
```

## put-preference
<a name="cli-cmd-put-preference"></a>

### 설명
<a name="cli-cmd-put-preference-description"></a>

전역 구성 기본 설정을 지정합니다. 대부분의 설정에는 관리자 권한이 필요합니다.

### 시놉시스
<a name="cli-cmd-put-preference-synopsis"></a>

```
aws-vpn-client put-preference
  --key <PREFERENCE_KEY>
  --value <PREFERENCE_VALUE>
```

### 옵션
<a name="cli-cmd-put-preference-options"></a>

`--key`(문자열)  
설정할 기본 설정 키의 이름입니다. 이 옵션은 필수입니다.

`--value`(문자열)  
기본 설정 키에 설정할 값입니다. 이 옵션은 필수입니다.

다음과 같은 기본 설정 키를 사용할 수 있습니다.

`enable-telemetry`  
원격 측정(true/false)을 활성화하거나 비활성화합니다.

`enable-user-profile-management`  
최종 사용자가 프로필을 가져오거나 삭제하도록 허용하거나 허용하지 않습니다(true/false).

`max-connections`  
최대 동시 연결 수(정수, 1\~5).

### 예제
<a name="cli-cmd-put-preference-examples"></a>

**예: 기본 설정**

다음 `put-preference` 예제에서는 최대 연결 수를 설정합니다. 여기에는 관리자 권한이 필요합니다. 성공에 대한 출력이 없습니다.

```
sudo aws-vpn-client put-preference --key max-connections --value 4
```

**예: 관리자 권한이 없는 오류**

다음 `put-preference` 예제에서는 관리자 권한 없이 명령을 실행할 때 발생하는 오류를 보여줍니다.

```
aws-vpn-client put-preference --key max-connections --value 4
```

출력:

```
{
  "status": "Error",
  "message": "Permission denied: admin privileges required"
}
```

**예: 잘못된 값 오류**

다음 `put-preference` 예제에서는 잘못된 값을 제공할 때 발생하는 오류를 보여줍니다.

```
sudo aws-vpn-client put-preference --key max-connections --value 8
```

출력:

```
{
  "status": "Error",
  "message": "Preference value is invalid"
}
```

## list-preferences
<a name="cli-cmd-list-preferences"></a>

### 설명
<a name="cli-cmd-list-preferences-description"></a>

모든 글로벌 구성 기본 설정과 현재 값을 표시합니다.

### 시놉시스
<a name="cli-cmd-list-preferences-synopsis"></a>

```
aws-vpn-client list-preferences
```

### 예제
<a name="cli-cmd-list-preferences-examples"></a>

**예: 모든 기본 설정 나열**

다음 `list-preferences` 예제에서는 모든 글로벌 구성 기본 설정과 현재 값을 표시합니다.

```
aws-vpn-client list-preferences
```

출력:

```
{
  "enable-telemetry": true,
  "enable-user-profile-management": true,
  "max-connections": 1
}
```

## send-diagnostic-logs
<a name="cli-cmd-send-diagnostic-logs"></a>

### 설명
<a name="cli-cmd-send-diagnostic-logs-description"></a>

문제 해결을 위해 진단 로그를 수집하여 AWS 에 제출합니다.

### 시놉시스
<a name="cli-cmd-send-diagnostic-logs-synopsis"></a>

```
aws-vpn-client send-diagnostic-logs
```

### 예제
<a name="cli-cmd-send-diagnostic-logs-examples"></a>

**예: 진단 로그 전송**

다음 `send-diagnostic-logs` 예제에서는 진단 로그를 수집하여에 제출합니다 AWS.

```
aws-vpn-client send-diagnostic-logs
```

출력:

```
{
  "reference-id": "us-west-2:78ff6531-5dc4-c706-7149-e6cfd8adadc7/2026-07-24-16-03-55.zip"
}
```

**참고**  
문제를 보고할 때 AWS Support와 `reference-id` 값을 공유합니다.

## 종료 코드
<a name="cli-cmd-exit-codes"></a>

 AWS Client VPN CLI 도구는 다음과 같은 종료 코드를 반환합니다.


| 종료 코드 | 의미 | 
| --- | --- | 
| 0 | 성공 | 
| 1 | 일반 오류 | 
| 2 | 잘못된 명령 구문 | 