Path: API › SSH 安全

`POST /ssh_security`

获取当前 SSH 安全配置状态。

## Request body

_Required._

- `action319.request_time` (string, required) — Unix 时间戳。
- `action319.request_token` (string, required) — 按 API 概览生成的签名。
- `action319.action` (string, required) — 具体操作名称。
  - one of `"get_config"`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "get_config"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/ssh_security" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=get_config"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "rsa_auth": "yes",
  "pubkey": "no",
  "password": "no",
  "root_is_login": "no",
  "root_login_type": "no",
  "root_login_types": {
    "yes": "可密码和密钥登录",
    "no": "禁止登录"
  }
}
```

- `action319.response.default.rsa_auth` (string, optional) — RSA 密钥认证状态
- `action319.response.default.pubkey` (string, optional) — 公钥认证：`yes`/`no`
- `action319.response.default.password` (string, optional) — 密码登录：`yes`/`no`
- `action319.response.default.root_is_login` (string, optional) — root 是否可登录
- `action319.response.default.root_login_type` (string, optional) — root 登录方式
- `action319.response.default.root_login_types` (object, optional) — 可选登录方式列表


## get_config

获取当前 SSH 安全配置状态。

- **路由**：`POST /ssh_security`
- **action**：`get_config`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `get_config` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| rsa_auth | String | RSA 密钥认证状态 |
| pubkey | String | 公钥认证：`yes`/`no` |
| password | String | 密码登录：`yes`/`no` |
| root_is_login | String | root 是否可登录 |
| root_login_type | String | root 登录方式 |
| root_login_types | Object | 可选登录方式列表 |

## 示例

```json
{
    "rsa_auth": "yes",
    "pubkey": "no",
    "password": "no",
    "root_is_login": "no",
    "root_login_type": "no",
    "root_login_types": {"yes": "可密码和密钥登录", "no": "禁止登录"}
}
```

