| 123456789101112131415161718192021222324 |
- #! /bin/sh
- #
-
- if [ "$#" -eq 0 ] || [ "$#" -gt 1 ]; then
- echo takes only one argument
- exit 1
- fi
-
- if [ ! -e "${1}" ]; then
- echo cannot find "${1}"
- exit 1
- fi
-
- # shellcheck source=./env_files/ssh-tunnel-example.env
- . "${1}"
- # shellcheck source=./.env-example
- . ./.env
-
- ssh \
- -v \
- -N \
- -L \
- "${TRAEFIK_LISTENING_IP}:${local_port}:${local_ip_on_remote}:${local_port_on_remote}" \
- "${remote_host}"
|