1
0
forked from finn/tinyboard

fix tunnel reachability check to be safe with set -e

This commit is contained in:
Justin Oros
2026-04-16 09:09:45 -07:00
parent ccd9b205b8
commit 2abd6ac6a4

View File

@@ -34,9 +34,11 @@ info "Scanning spoke host key..."
ssh-keyscan -p "$TUNNEL_PORT" -H localhost >> "$SSH_DIR/known_hosts" 2>/dev/null
info "Verifying spoke is reachable on port $TUNNEL_PORT..."
ssh -o BatchMode=yes -o ConnectTimeout=10 -p "$TUNNEL_PORT" armbian@localhost exit 2>/dev/null \
&& info "Spoke is reachable." \
|| warn "Could not verify spoke without a key yet — proceeding to key setup."
if ssh -o BatchMode=yes -o ConnectTimeout=10 -p "$TUNNEL_PORT" armbian@localhost exit 2>/dev/null; then
info "Spoke is reachable."
else
warn "Could not verify spoke without a key yet — proceeding to key setup."
fi
header "Generating Hub SSH Key"
if [ -f "$KEY_PATH" ]; then