Blame


1 7b682af0 2021-11-21 op # lstun -- lazy ssh tunnel
2 7b682af0 2021-11-21 op
3 7b682af0 2021-11-21 op lstun is a simple utility to lazily (on demand) spawn a ssh tunnel to
4 7b682af0 2021-11-21 op a remote machine and kill it after some time of inactivity.
5 7b682af0 2021-11-21 op
6 2cb54b16 2022-02-26 op Note that the the -main branch targets OpenBSD only; on other systems
7 2cb54b16 2022-02-26 op please use the -portable branch.
8 2cb54b16 2022-02-26 op
9 7b682af0 2021-11-21 op To compile it just run
10 7b682af0 2021-11-21 op
11 56be64f8 2021-11-25 op $ make
12 7b682af0 2021-11-21 op
13 2040c43f 2021-11-25 op The only dependency is libevent. It expects ssh to be `/usr/bin/ssh`,
14 2040c43f 2021-11-25 op compile with `-DSSH_PATH=...` to alter the path eventually.
15 7b682af0 2021-11-21 op
16 355ad914 2021-12-01 op
17 355ad914 2021-12-01 op ### Usage
18 355ad914 2021-12-01 op
19 355ad914 2021-12-01 op ```
20 355ad914 2021-12-01 op usage: lstun [-dv] -B sshaddr -b addr [-t timeout] destination
21 355ad914 2021-12-01 op ```
22 355ad914 2021-12-01 op
23 355ad914 2021-12-01 op Check out the manpage for further the usage.
24 355ad914 2021-12-01 op
25 355ad914 2021-12-01 op
26 355ad914 2021-12-01 op ### Motivation
27 355ad914 2021-12-01 op
28 355ad914 2021-12-01 op It was written to forward lazily all the traffic on the local port
29 355ad914 2021-12-01 op 2525 to a remote port 25, thus using ssh as some sort of
30 355ad914 2021-12-01 op authentication.
31 355ad914 2021-12-01 op
32 355ad914 2021-12-01 op The need for the "lazy" opening and closing of the tunnel is to avoid
33 355ad914 2021-12-01 op wasting resources when not needed.