File tree Expand file tree Collapse file tree 5 files changed +23
-2
lines changed
Expand file tree Collapse file tree 5 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,13 @@ All variables are documented here:
5858:-----:|:-----:|:-----:
5959PUID|User ID the SSH user should run as.|9999
6060PGID|Group ID the SSH user should run as.|9999
61+ DEBUG\_ MODE|Display a bunch of helpful content for debugging.|false
6162SSH\_ USER|Username for the SSH user that other users will connect into as.|tunnel
6263SSH\_ GROUP|Group name used for our SSH user.|tunnelgroup
63- SSH\_ USER\_ HOME|Home location of the SSH user.|/home/` $SSH_USER `
64+ SSH\_ USER\_ HOME|Home location of the SSH user.|/home/$SSH \_ USER
6465SSH\_ PORT|Listening port for SSH server (on container only. You'll still need to publish this port).|2222
6566SSH\_ HOST\_ KEY\_ DIR|Location of where the SSH host keys should be stored.|/etc/ssh/ssh\_ host\_ keys/
66- AUTHORIZED\_ KEYS|🚨 <b >Required to be set</b > (if there isn't a ` $SSH_USER_HOME/.ssh/authorized_keys ` file provided). [ See below] |
67+ AUTHORIZED\_ KEYS|🚨 <b >Required to be set by you. </b > Content of your authorized keys file (see below) |
6768ALLOWED\_ IPS|🚨 <b >Required to be set by you.</b > Content of allowed IP addresses (see below)|
6869
6970
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
1919 SSH_GROUP="tunnelgroup" \
2020 SSH_PORT="2222" \
2121 SSH_HOST_KEY_DIR="/etc/ssh/ssh_host_keys" \
22+ DEBUG_MODE="false" \
2223 LC_ALL="en_US.UTF-8" \
2324 LANG="en_US.UTF-8" \
2425 LANGUAGE="en_US.UTF-8"
Original file line number Diff line number Diff line change 11#!/command/with-contenv bash
22
3+ if [ $DEBUG_MODE == true ]; then
4+ set -x
5+ fi
6+
37# Check if SSH host keys are missing
48if [ ! -f $SSH_HOST_KEY_DIR/ssh_host_* ]; then
59 echo "🏃♂️ Generating SSH keys for you..."
Original file line number Diff line number Diff line change 11#!/command/with-contenv bash
2+ if [ $DEBUG_MODE == true ]; then
3+ set -x
4+ fi
25
36SSH_USER_HOME="${SSH_USER_HOME:-"/home/$SSH_USER"}"
47
@@ -25,6 +28,14 @@ echo "🤖 Setting SSHD configuration..."
2528 echo "HostKey ${SSH_HOST_KEY_DIR}/ssh_host_ed25519_key"
2629} > /etc/ssh/sshd_config.d/custom.conf
2730
31+ if [ $DEBUG_MODE == true ]; then
32+ echo "🔥🔥🔥 Putting SSH server into Debug Mode..."
33+ {
34+ echo "SyslogFacility AUTHPRIV"
35+ echo "LogLevel DEBUG"
36+ } >> /etc/ssh/sshd_config.d/custom.conf
37+ fi
38+
2839# Make the SSH directory
2940mkdir -p $SSH_USER_HOME/.ssh/
3041
Original file line number Diff line number Diff line change 11#!/command/with-contenv bash
22
3+ if [ $DEBUG_MODE == true ]; then
4+ set -x
5+ fi
6+
37SSH_USER_HOME="${SSH_USER_HOME:-"/home/$SSH_USER"}"
48
59# Create our SSH user
You can’t perform that action at this time.
0 commit comments