Files
local_machine/docs/connectivity/scripts/ssh-hunab-prod.sh
ahauimix 1938b7c743 Expand local_machine docs and automation for connectivity, games, and ops.
Add proxy/VPN/telegram launchd and emergency runbooks; reorganize apps docs;
document JA3 CrossOver runbook and Wine troubleshooting; add GOG/HoMM game
scripts, disk cleanup guides, and gitea push-via-proxy helper. Ignore temp/.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 08:12:19 +03:00

20 lines
931 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# SSH к проду: по умолчанию в конфиге hunab-prod уже через hsites-ahau.
# Если прямой DO доступен — быстрее hunab-prod-direct (пробуем за 8 с).
# HUNAB_PROD_FORCE_VIA=1 — не пробовать прямой, сразу hunab-prod (через RU).
# HUNAB_PROD_FORCE_DIRECT=1 — только hunab-prod-direct.
# Использование: ./ssh-hunab-prod.sh [аргументы ssh]
set -e
KA=( -o ServerAliveInterval=30 -o ServerAliveCountMax=8 -o TCPKeepAlive=yes )
if [ "${HUNAB_PROD_FORCE_DIRECT:-0}" = "1" ]; then
exec ssh "${KA[@]}" hunab-prod-direct "$@"
fi
if [ "${HUNAB_PROD_FORCE_VIA:-0}" != "1" ]; then
if ssh "${KA[@]}" -o BatchMode=yes -o ConnectTimeout=8 -o ConnectionAttempts=1 hunab-prod-direct "exit 0" 2>/dev/null; then
exec ssh "${KA[@]}" hunab-prod-direct "$@"
fi
fi
exec ssh "${KA[@]}" hunab-prod "$@"