#!/bin/sh set -eu : "${CORE_SSH_HOST:?Set CORE_SSH_HOST}" : "${CORE_SSH_USER:?Set CORE_SSH_USER}" exec ssh -NT \ -p "${CORE_SSH_PORT:-22}" \ -i /run/ssh/id_ed25519 \ -o BatchMode=yes \ -o IdentitiesOnly=yes \ -o StrictHostKeyChecking=yes \ -o UserKnownHostsFile=/run/ssh/known_hosts \ -o GlobalKnownHostsFile=/dev/null \ -o ExitOnForwardFailure=yes \ -o ServerAliveInterval=30 \ -o ServerAliveCountMax=3 \ -o ConnectTimeout=10 \ -L "0.0.0.0:3306:${CORE_DB_HOST:-127.0.0.1}:${CORE_DB_PORT:-13306}" \ "${CORE_SSH_USER}@${CORE_SSH_HOST}"