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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File format:
# [<group>.<subgroup>.<host>]
# host = "<host address or IP>"
# port = <SSH port> # optional, default is 22, of course
# user = "<user name>" # optional, default is the current user
# key = "<path to key file>" # optional, not used by default
# verbose = true/false # optional, false by default
# agent_passthrough = true/false # optional, false by default if no tunnel is configured, true otherwise
# tunnel = false/tunnelspec # optional, false by default if no tunnels in chain are configured
# no_command = false/true # optional, false by default if no tunnel is configured, true otherwise
= ["user@be-3.example.com:2244:~/.ssh/be.pem"]
= [{ = "be-3.example.com", = 1234, = "/bla/bla.pem" }]
= ["user@be-5.example.com::~/.ssh/be.pem"]
[[]]
= "be-1.example.com"
= 2222
= "user"
= "~/.ssh/be.pem"
= true
[[]]
= "be-2.example.com"
# port = 22
# user = current user
# key = None
# verbose = false
# agent_passthrough = false
# tunnel = false
# no_command = false
# ssh -p 2222 user@some.server -t ssh -i /a/b/c.pem -p 1234 whatever -t ssh -i ~/whatever.pem -p 1234 unknown
[]
= [
{ = "some.server", = 2222, = "user" },
{ = "whatever:1234:/a/b/c.pem" },
{ = "unknown:1234", = "~/whatever.pem" }
]
# Equivalent:
# tunnel = { local = 12345, remote = 12345, remote_host = "localhost" }
# tunnel = { local = 12345, remote = 12345 }
# tunnel = { local = 12345 }
# tunnel = ":12345|localhost:12345"
# tunnel = ":|localhost:12345"
# tunnel = ":12345|localhost:"
# tunnel = ":|:12345"
# tunnel = ":12345|:"
# tunnel = 12345
# Equivalent:
# tunnel = { local = 12345, remote = 12345, remote_host = "localhost", local_host = "1.2.3.4" }
# tunnel = { local = 12345, remote = 12345, local_host = "1.2.3.4" }
# tunnel = { local = 12345, local_host = "1.2.3.4" }
# tunnel = "1.2.3.4:12345|localhost:12345"
# tunnel = "1.2.3.4:|localhost:12345"
# tunnel = "1.2.3.4:12345|localhost:"
# tunnel = "1.2.3.4:|:12345"
# tunnel = "1.2.3.4:12345|:"
# ssh -L 12345:localhost:12345 whatever -t ssh -L 12345:localhost:12345 something -N
[]
= [
{ = "whatever", = 12345 },
{ = "something" }, # taken from above
]
# ssh -L 1221:localhost:4443 whatever -t ssh -L 4443:localhost:443 something -N
= [
{ = "whatever", = ":1221|:4433" },
{ = "something", = ":4443|:443" }
]
# ssh -L 1221:something:443 whatever -N
= [{ = "whatever", = ":1221|something:443" }]
# ssh host1 -t ssh host2 -t ssh -A -L 12345:localhost:12345 host3 -t ssh -A -L 12345:localhost:12345 host4 -t ssh -L 12345:localhost:12345 host5 -N
= [
{ = "host1" },
{ = "host2" },
{ = "host3", = 12345 }, # falls "down", incl. agent_passthrough = true
{ = "host4" },
{ = "host5" }
]
# ssh -A -L 1221:localhost:4443 whatever -t ssh -L 4443:localhost:443 something -N
= [
{ = "whatever", = ":1221|:4443" },
{ = "something", = ":4443|:443" }
]
#include_local = true # default: true
#intermediate_port = 4433 # default: =local_port
#local_port = 1221 # default: =target_port
#target_port = 443
#chain = ["whatever", "something"]
# ssh -A -L 12345:localhost:12345 whatever -t ssh -L 12345:localhost:12345 something -N
= [
{ = "whatever", = 12345 },
{ = "something" },
]
# ssh -A -L 12345:localhost:12345 host1 -t \
# ssh -A -L 12345:localhost:12345 host2 -t \
# ssh -A -L 12345:localhost:12345 -t \
# ssh -A -L 1234:localhost:12345 host4
= [
{ = "host1", = 12345 },
{ = "host2" },
{ = "host3" },
{ = "host4", = true, = false }
]