2022-08-31 13:21:29 +08:00
|
|
|
### 结构
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
2022-08-31 13:21:29 +08:00
|
|
|
"type": "ssh",
|
|
|
|
"tag": "ssh-out",
|
|
|
|
|
|
|
|
"server": "127.0.0.1",
|
|
|
|
"server_port": 22,
|
|
|
|
"user": "root",
|
|
|
|
"password": "admin",
|
|
|
|
"private_key": "",
|
|
|
|
"private_key_path": "$HOME/.ssh/id_rsa",
|
|
|
|
"private_key_passphrase": "",
|
2023-02-08 16:20:48 +08:00
|
|
|
"host_key": [
|
|
|
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdH..."
|
|
|
|
],
|
2022-08-31 13:21:29 +08:00
|
|
|
"host_key_algorithms": [],
|
|
|
|
"client_version": "SSH-2.0-OpenSSH_7.4p1",
|
|
|
|
|
|
|
|
... // 拨号字段
|
2022-08-24 21:02:28 +08:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-08-31 13:21:29 +08:00
|
|
|
### 字段
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### server
|
|
|
|
|
|
|
|
==必填==
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
服务器地址。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### server_port
|
|
|
|
|
|
|
|
服务器端口,默认使用 22。
|
|
|
|
|
|
|
|
#### user
|
|
|
|
|
|
|
|
SSH 用户, 默认使用 root。
|
|
|
|
|
|
|
|
#### password
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
密码。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### private_key
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
密钥。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### private_key_path
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
密钥路径。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### private_key_passphrase
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
密钥密码。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
2023-02-08 16:20:48 +08:00
|
|
|
#### host_key
|
|
|
|
|
|
|
|
主机密钥,留空接受所有。
|
|
|
|
|
2022-08-24 21:02:28 +08:00
|
|
|
#### host_key_algorithms
|
|
|
|
|
2022-08-25 09:45:22 +08:00
|
|
|
主机密钥算法。
|
2022-08-24 21:02:28 +08:00
|
|
|
|
|
|
|
#### client_version
|
|
|
|
|
|
|
|
客户端版本,默认使用随机值。
|
|
|
|
|
|
|
|
### 拨号字段
|
|
|
|
|
2022-08-31 13:21:29 +08:00
|
|
|
参阅 [拨号字段](/zh/configuration/shared/dial/)。
|