Blame


1 b542d800 2021-11-20 op .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
2 b542d800 2021-11-20 op .\"
3 b542d800 2021-11-20 op .\" Permission to use, copy, modify, and distribute this software for any
4 b542d800 2021-11-20 op .\" purpose with or without fee is hereby granted, provided that the above
5 b542d800 2021-11-20 op .\" copyright notice and this permission notice appear in all copies.
6 b542d800 2021-11-20 op .\"
7 b542d800 2021-11-20 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 b542d800 2021-11-20 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 b542d800 2021-11-20 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 b542d800 2021-11-20 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 b542d800 2021-11-20 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 b542d800 2021-11-20 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 b542d800 2021-11-20 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 8947862e 2021-11-23 op .Dd $Mdocdate: November 23 2021$
15 b542d800 2021-11-20 op .Dt LSTUN 1
16 b542d800 2021-11-20 op .Os
17 b542d800 2021-11-20 op .Sh NAME
18 b542d800 2021-11-20 op .Nm lstun
19 b542d800 2021-11-20 op .Nd lazy ssh tunnel
20 b542d800 2021-11-20 op .Sh SYNOPSIS
21 b542d800 2021-11-20 op .Nm
22 b542d800 2021-11-20 op .Bk -words
23 8947862e 2021-11-23 op .Fl B Ar sshaddr
24 b542d800 2021-11-20 op .Fl b Ar addr
25 b542d800 2021-11-20 op .Op Fl t Ar timeout
26 b542d800 2021-11-20 op .Ar destination
27 b542d800 2021-11-20 op .Ek
28 b542d800 2021-11-20 op .Sh DESCRIPTION
29 b542d800 2021-11-20 op .Nm
30 b542d800 2021-11-20 op binds the local
31 b542d800 2021-11-20 op .Ar addr
32 b542d800 2021-11-20 op and lazily spawns an
33 b542d800 2021-11-20 op .Xr ssh 1
34 b542d800 2021-11-20 op instance to forward the traffic to a remote end.
35 b542d800 2021-11-20 op After
36 b542d800 2021-11-20 op .Ar timeout
37 b542d800 2021-11-20 op seconds
38 b542d800 2021-11-20 op from the last client activity, the ssh tunnel is closed.
39 b542d800 2021-11-20 op .Pp
40 b542d800 2021-11-20 op The
41 b542d800 2021-11-20 op .Xr ssh 1
42 b542d800 2021-11-20 op tunnel is established by running
43 b542d800 2021-11-20 op .Bk
44 b542d800 2021-11-20 op .Pa /usr/bin/ssh
45 8947862e 2021-11-23 op .Fl L Ar sshaddr
46 b542d800 2021-11-20 op .Fl NTq
47 b542d800 2021-11-20 op .Ar destination .
48 b542d800 2021-11-20 op .Ek
49 b542d800 2021-11-20 op .Pp
50 b542d800 2021-11-20 op The arguments are as follows:
51 b542d800 2021-11-20 op .Bl -tag -width Ds
52 8947862e 2021-11-23 op .It Fl B Xo
53 8947862e 2021-11-23 op .Sm off
54 8947862e 2021-11-23 op .Oo Ar bind_address : Oc
55 8947862e 2021-11-23 op .Ar port : host : hostport
56 8947862e 2021-11-23 op .Sm on
57 8947862e 2021-11-23 op .Xc
58 b542d800 2021-11-20 op Fed to
59 b542d800 2021-11-20 op .Xr ssh 1
60 b542d800 2021-11-20 op .Fl L
61 b542d800 2021-11-20 op flag.
62 b542d800 2021-11-20 op .It Fl b Ar addr
63 b542d800 2021-11-20 op Where to bind the local socket.
64 b542d800 2021-11-20 op A port number or the tuple host:port.
65 b542d800 2021-11-20 op .It Fl t Ar timeout
66 b542d800 2021-11-20 op Number of seconds after after the last client shutdown to kill the ssh
67 b542d800 2021-11-20 op process.
68 b542d800 2021-11-20 op Defaults to 120.
69 b542d800 2021-11-20 op .El
70 b542d800 2021-11-20 op .Sh AUTHORS
71 b542d800 2021-11-20 op .An -nosplit
72 b542d800 2021-11-20 op The
73 b542d800 2021-11-20 op .Nm
74 b542d800 2021-11-20 op utility was written by
75 b542d800 2021-11-20 op .An Omar Polo Aq Mt op@omarpolo.com .
76 236c6984 2021-11-21 op .Sh CAVEATS
77 4caeea22 2021-11-21 op Currently it's impossible to pass flags to the
78 4caeea22 2021-11-21 op .Xr ssh 1
79 4caeea22 2021-11-21 op subcommand.
80 4caeea22 2021-11-21 op This is especially painful when you need to use, say, a jump host.