Update Backends
parent
96fe1de37f
commit
169ea267f6
19
Backends.md
19
Backends.md
@ -123,14 +123,16 @@ ssh user:serial.ttyS0.115200.8n1@ssh.example.com
|
|||||||
|
|
||||||
If the **file** option is used instead of **directory**, the file name is omitted.
|
If the **file** option is used instead of **directory**, the file name is omitted.
|
||||||
|
|
||||||
|
Here's the updated documentation for the `proxy` backend with the `server` and `port` settings replaced by `host` and `hosts`:
|
||||||
|
|
||||||
## `proxy`
|
## `proxy`
|
||||||
|
|
||||||
The Proxy backend allows SSH connections to be proxied to another server.
|
The Proxy backend allows SSH connections to be proxied to another server.
|
||||||
|
|
||||||
### Settings
|
### Settings
|
||||||
|
|
||||||
- **server** (string): The target server's address.
|
- **host** (string): The target server's address in the format `addr:port`. If this is set, it will override **hosts**.
|
||||||
- **port** (optional, uint): The target server's port. The default is `22`.
|
- **hosts** (optional, array of strings): An array of target server addresses in the format `addr:port`. The `addr` portion can accept globs to match with the client-supplied seashell argument.
|
||||||
- **user** (optional, string): The user to connect as on the proxy server. If this is not set, **user_map** will be used to determine the right user, or the seashell username will be used if the user doesn't exist in the map.
|
- **user** (optional, string): The user to connect as on the proxy server. If this is not set, **user_map** will be used to determine the right user, or the seashell username will be used if the user doesn't exist in the map.
|
||||||
- **privkey** (optional, string): The path to the private key for authentication. If this is not provided, users will be asked for the target server's password when they attempt to connect.
|
- **privkey** (optional, string): The path to the private key for authentication. If this is not provided, users will be asked for the target server's password when they attempt to connect.
|
||||||
- **user_map** (optional, map[string]string): A map from seashell usernames to target server usernames.
|
- **user_map** (optional, map[string]string): A map from seashell usernames to target server usernames.
|
||||||
@ -149,8 +151,17 @@ permissions = {
|
|||||||
|
|
||||||
### Client Commands
|
### Client Commands
|
||||||
|
|
||||||
The proxy backend doesn't use the seashell argument, so you will only need to provide the routing path in your ssh command. For example, with a route configured to match `proxy`, you can use the following command:
|
If the **host** setting is configured, the proxy backend will not use the seashell argument. However, if **hosts** is configured, the argument will be used to match the seashell arguments.
|
||||||
|
|
||||||
|
For example, with a route configured to match `proxy` and **host** provided, you can use the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh user:proxy@ssh.example.com
|
ssh user:proxy@ssh.example.com # host = "192.168.1.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
If the **hosts** array is provided instead and your route is configured to match `proxy\\.(.+)`, you can use commands like the following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh user:proxy.node00@ssh.example.com # hosts = ["node[0-9][0-9]"]
|
||||||
|
ssh user:proxy.192.168.1.1@ssh.example.com # hosts = ["192.168.1.*"]
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user