1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SSH Channels Hub configuration
#
# Host info (HostName / User / Port / IdentityFile) is read from ~/.ssh/config.
# This file only defines:
# - which channels to bring up
# - per-host credentials SSH config can't hold (password / passphrase)
# - reconnection policy
#
# Optional: point at a non-default SSH config path.
# ssh_config = "~/.ssh/config"
# --- Reconnection settings (applies to all channels) ---
[]
= 0 # 0 = unlimited
= 1
= 30
= true
# --- Per-host credential overrides (optional) ---
# Only needed when SSH config alone can't authenticate (password-auth host,
# or IdentityFile with a passphrase). Keyed by SSH config Host alias.
# [auth.example-server]
# passphrase = "key-passphrase"
# [auth.example-server2]
# password = "your-password-here"
# --- Channel definitions ---
# `hostname` is the SSH config Host alias.
# `local` / `remote` are "host:port" (host defaults to 127.0.0.1) — they
# always literally mean the local / remote side, regardless of direction.
# Append new `[[channels]]` blocks below; nothing else needs to follow them.
[[]]
= "db-tunnel"
= "example-server"
= "local->remote" # ssh -L: listen on `local`, forward to `remote`
= "3306"
= "3306"
[[]]
= "web-tunnel"
= "example-server2"
= "local->remote"
= "0.0.0.0:8080"
= "127.0.0.1:80"
# Expose a local service on the SSH server:
# [[channels]]
# name = "expose-local-web"
# hostname = "example-server"
# direction = "remote->local" # ssh -R: server binds `remote`, bridge to `local`
# remote = "8022"
# local = "80"