diff --git a/hub/onboard-spoke.sh b/hub/onboard-spoke.sh index 4614cfa..347234a 100644 --- a/hub/onboard-spoke.sh +++ b/hub/onboard-spoke.sh @@ -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