File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
root/etc/s6-overlay/s6-rc.d/init-mod-openssh-server-ssh-tunnel-setup Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,9 @@ Example:
1919
2020When creating the container with the following setup:
2121```
22- version: '2'
2322services:
2423 openssh-server:
25- image: linuxserver/openssh-server
24+ image: lscr.io/ linuxserver/openssh-server
2625 environment:
2726 - DOCKER_MODS=linuxserver/mods:openssh-server-ssh-tunnel
2827 - SHELL_NOLOGIN=false
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
3+ # set config path
4+ if [[ -f /config/sshd/sshd_config ]]; then
5+ CONFIG_FILE_PATH="/config/sshd/sshd_config"
6+ else
7+ CONFIG_FILE_PATH="/etc/ssh/sshd_config"
8+ fi
9+
310# allow tcp forwarding within openssh settings
4- sed -i '/^AllowTcpForwarding/c\AllowTcpForwarding yes' /etc/ssh/sshd_config
5- sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' /etc/ssh/sshd_config
11+ sed -i '/^AllowTcpForwarding/c\AllowTcpForwarding yes' "${CONFIG_FILE_PATH}"
12+ sed -i '/^GatewayPorts/c\GatewayPorts clientspecified' "${CONFIG_FILE_PATH}"
613echo "TcpForwarding is enabled"
714
815if [ "$SHELL_NOLOGIN" == 'true' ]; then
You can’t perform that action at this time.
0 commit comments