From 7fd95b6ba5365ce847833387bffbcb6c207853e4 Mon Sep 17 00:00:00 2001 From: Elara Date: Sun, 4 Aug 2024 23:30:13 +0000 Subject: [PATCH] Update Backends --- Backends.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/Backends.md b/Backends.md index f33a69f..dc1c893 100644 --- a/Backends.md +++ b/Backends.md @@ -20,6 +20,14 @@ permissions = { } ``` +### Client Commands + +To access the `example` container through seashell, with a route configured to match `docker\\.(.+)`, you can use the following command: + +```bash +ssh user:docker.example@ssh.example.com +``` + ## `nomad` The Nomad backend integrates with a [Nomad](https://nomadproject.io) server to provide shell access into Nomad allocations. @@ -46,9 +54,34 @@ permissions = { } ``` +### Client Commands + +To access a nomad allocation through seashell, with a route configured to match `nomad\\.(.+)`, you can use one of the following command formats based on the number of arguments. If you leave any of the elements except the job name blank, seashell will use the first one it finds: + +- **1 argument**: The argument corresponds to the job name. + + ```bash + ssh user:nomad.job_name@ssh.example.com + ``` +- **2 arguments**: The first argument is the job name, and the second is the task name. + + ```bash + ssh user:nomad.job_name.task_name@ssh.example.com + ``` +- **3 arguments**: The first argument is the job name, the second argument is the task group name, and the third argument is the task name. + + ```bash + ssh user:nomad.job_name.task_group_name.task_name@ssh.example.com + ``` +- **4 arguments**: The first argument is the job name, the second argument is the allocation UUID or the index of the allocation (e.g. 0, 1), the third argument is the task group name, and the fourth argument is the task name. + + ```bash + ssh user:nomad.job_name.alloc.task_group_name.task_name@ssh.example.com + ``` + ## `serial` -The Serial backend provides shell access over serial connections. +The Serial backend provides remote access to serial ports. ### Settings @@ -70,9 +103,25 @@ permissions = { } ``` +### Client Commands + +To access the `ttyUSB0` serial port through seashell, if the **directory** setting is used, with a route configured to match `serial\\.(.+)`, you can use the following command: + +```bash +ssh user:serial.ttyUSB0@ssh.example.com +``` + +To specify the baud rate and mode, you can use the following command: + +```bash +ssh user:serial.ttyS0.115200.8n1@ssh.example.com +``` + +If the **file** option is used instead of **directory**, the file name is omitted. + ## `proxy` -The Proxy backend allows SSH connections to be proxied through another server. +The Proxy backend allows SSH connections to be proxied to another server. ### Settings @@ -91,4 +140,12 @@ permissions = { allow = ["*"] } } +``` + +### 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: + +```bash +ssh user:proxy@ssh.example.com ``` \ No newline at end of file