ssh туннель

This commit is contained in:
2026-10-04 13:36:43 +04:00
parent 5952e966d2
commit 22cb56e52f
7 changed files with 328 additions and 5 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/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}"