1
0
mirror of https://github.com/jnovack/autossh.git synced 2021-09-26 16:11:30 +03:00

Standardized variable names

This commit is contained in:
Justin J. Novack
2020-08-26 21:00:23 -04:00
parent 0a42566177
commit 2965684918
3 changed files with 12 additions and 5 deletions

View File

@@ -13,6 +13,9 @@ A number of breaking changes were made which requried a version bump.
- `SSH_HOSTUSER` to `SSH_REMOTE_USER`
- `SSH_HOSTNAME` to `SSH_REMOTE_HOST`
- `SSH_HOSTPORT` to `SSH_REMOTE_PORT`
- `SERVER_ALIVE_INTERVAL` to `SSH_SERVER_ALIVE_INTERVAL`
- `SERVER_ALIVE_COUNT_MAX` to `SSH_SERVER_ALIVE_COUNT_MAX`
- Docker Swarm compatibility
- Renamed `SSH_KNOWN_HOSTS` to `SSH_KNOWN_HOSTS_FILE`

View File

@@ -157,6 +157,10 @@ or set `SSH_KNOWN_HOSTS_FILE`.
### Environment Variables
All the envrionment variables are prefaced with `SSH_` NOT because you are
required to tunnel SSH, but for ease of grouping. The only SSH connection
that is required is from the LOCAL device to the REMOTE server.
#### SSH_REMOTE_USER
Specify the usename on the *remote* endpoint. (Default: `root`)
@@ -228,7 +232,7 @@ You can define which IP address the tunnel will use to bind.
Use of this option will NOT have an effect unless you properly configure the
`GatewayPorts` variable in your **remote** server's configuration file.
#### SERVER_ALIVE_INTERVAL
#### SSH_SERVER_ALIVE_INTERVAL
Sets a timeout interval in seconds after which if no data has been
received from the server, ssh(1) will send a message through the encrypted channel to
@@ -239,12 +243,12 @@ request a response from the server.
Additional details are available from [`ssh_config(5)`](https://linux.die.net/man/5/ssh_config)
#### SERVER_ALIVE_COUNT_MAX
#### SSH_SERVER_ALIVE_COUNT_MAX
Sets the threshold of alive messages after which the connection is terminated and reestablished.
- `3` is the default for this image.
- `SERVER_ALIVE_INTERVAL=0` turns this variable ineffective.
- `SSH_SERVER_ALIVE_INTERVAL=0` makes this variable ineffective.
Additional details are available from [`ssh_config(5)`](https://linux.die.net/man/5/ssh_config)

View File

@@ -51,8 +51,8 @@ COMMAND="autossh "\
"-M 0 "\
"-N "\
"-o StrictHostKeyChecking=${STRICT_HOSTS_KEY_CHECKING} ${KNOWN_HOSTS_ARG:=}"\
"-o ServerAliveInterval=${SERVER_ALIVE_INTERVAL:-10} "\
"-o ServerAliveCountMax=${SERVER_ALIVE_COUNT_MAX:-3} "\
"-o ServerAliveInterval=${SSH_SERVER_ALIVE_INTERVAL:-10} "\
"-o ServerAliveCountMax=${SSH_SERVER_ALIVE_COUNT_MAX:-3} "\
"-o ExitOnForwardFailure=yes "\
"-t -t "\
"${SSH_MODE:=-R} ${SSH_BIND_IP}:${SSH_TUNNEL_PORT}:${SSH_TARGET_HOST}:${SSH_TARGET_PORT} "\