aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: e6b11b74956fdb5638a624102a6778cbeef2532d (plain)
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
# Establish persistent ssh tunnels

Establish a persistent TCP tunnel between a local endpoint and a remote server.
If the connection drops, reconnection attempts are made every 10 seconds.

```
SYNOPSYS
    ./proxy-tcp-ssh.sh (-S|--ssh-host) SSHHOST (-t|--tunnel) TUNNELSPEC [OPTIONS]
DESCRIPTION
    Spawn TCP tunnels between your computer and a remote SSH server. If the
    connection fail for some reason, the script will try to re-create the
    tunnels automatically every TIMEOUT seconds.
OPTIONS
    -S,--ssh-host SSHHOST
        Set the ssh host. SSHHOST can be either the full hostname as you would
        specify it on the ssh command-line (e.g. [user@]myserver.com or hostname
        if it is set up in your ssh config).

    -t,--tunnel TUNNELSPEC
        Specify the ports to tunnel as a comma-separated list of either single
        ports or port pairs (e.g. -t 443,80:8080 will establish tunnels
        local:443-remote:443  and local:8080-remote:80). Note that you have to
        be a privileged user (i.e. a user with the CAP_NET_BIND_SERVICE
        capability) to be able to bind to ports below 1024.

    -p,--ssh-port SSHPORT /!\ Not implemented
        Set the ssh remote port if different from the default.

    -H,--host HOST
        Set the tunnel host. HOST can be either the IP or hostname of the
        server to tunnel to, as seen from the ssh host. Defaults to localhost.

    -i,--interface IF /!\ Not implemented
        Specify the local interface to bind to. Defaults to localhost. Setting
        it to 0.0.0.0 will make the tunnel available to other clients on your
        network (depending on your firewall rules).

    -f
        Fork the script to the background.

    -h,--help
        Print this help and exit.
```