Expand description
The optional TOML configuration file.
Nothing here is required: rash works entirely from the command line and the
environment, exactly as autossh does. The file exists so a tunnel you run
often can be named once and started with rash --session homelab.
[defaults]
poll = 600
gatetime = 30
[session.homelab]
monitor = 20000 # or "20000:7", "unix", 0
ssh_args = ["-N", "-R", "2200:localhost:22", "me@host"]
poll = 300
message = "homelab"Everything a section can set is also settable by flag or environment variable, and those win — the file is the lowest layer of the precedence stack, above only the built-in defaults.
§Key names
A key is its environment variable with the AUTOSSH_/RASH_ prefix removed
and lowercased, which is why gatetime and maxlifetime run together while
first_poll and kill_timeout do not — AUTOSSH_GATETIME has no
underscore and AUTOSSH_FIRST_POLL does. It looks inconsistent and is not:
do not “tidy” one group to match the other, or every key becomes a guess.
ssh_args is the sole exception, having no variable of its own.
AUTOSSH_DEBUG and RASH_TOUCH_PIDFILE deliberately have no key here: both
are switches for a single run, not settings for a tunnel.
deny_unknown_fields is on, so a mistyped key is a hard error rather than a
setting that silently does nothing. That makes the list in rash(1) the
contract; keep the two in step.
Structs§
- File
- A parsed config file.
- Section
- One
[defaults]or[session.<name>]block. Every field is optional; an absent one simply defers to the layer below.
Enums§
- Spec
- A monitor spec, which TOML may express as a bare integer or as a string.