Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ SSH_GROUP|Group name used for our SSH user.|`tunnelgroup`
SSH_HOST_KEY_DIR|Location of where the SSH host keys should be stored.|`/etc/ssh/ssh_host_keys/`
SSH_PORT|Listening port for SSH server (on container only. You'll still need to publish this port).|`2222`
SSH_USER|Username for the SSH user that other users will connect into as.|`tunnel`
SSH_GATEWAYPORTS|Setting for the GatewayPorts sshd_config for reverse tunnelling|`no`


### 1. Set your `AUTHORIZED_KEYS` environment variable or provide a `/authorized_keys` file
Expand Down
3 changes: 2 additions & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ ENV ALLOWED_IPS="AllowUsers tunnel" \
PUID=9999 \
SSH_HOST_KEY_DIR="/etc/ssh/ssh_host_keys" \
SSH_PORT="2222" \
SSH_USER="tunnel"
SSH_USER="tunnel" \
SSH_GATEWAYPORTS="no"

ARG PACKAGE_DEPENDENCIES="openssh-server,iputils-ping,locales,tini" \
REPOSITORY_BUILD_VERSION="dev"
Expand Down
3 changes: 2 additions & 1 deletion src/rootfs/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ssh_user=${SSH_USER:-"${default_unprivileged_user}"}
ssh_host_key_dir=${SSH_HOST_KEY_DIR:-"/etc/ssh/ssh_host_keys"}
ssh_user_home="/home/${ssh_user}"
ssh_port=${SSH_PORT:-"2222"}

gatewayports=${SSH_GATEWAYPORTS:-"no"}

if [ "$DEBUG" = "true" ]; then
set -x
Expand Down Expand Up @@ -119,6 +119,7 @@ echo "🤖 Setting SSHD configuration..."
echo "MaxStartups 10:30:100"
echo "ClientAliveInterval 300"
echo "ClientAliveCountMax 2"
echo "GatewayPorts ${gatewayports}"
} > /etc/ssh/sshd_config.d/custom.conf

if [ "$DEBUG" = "true" ]; then
Expand Down