2025-12-21 22:32:09 -08:00
|
|
|
#!/usr/bin/env bash
|
2026-02-12 15:46:57 -08:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
# Load IP configuration
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
|
|
|
|
|
|
|
2025-12-21 22:32:09 -08:00
|
|
|
# SSH to Proxmox host with locale warnings suppressed
|
|
|
|
|
# Usage: ./scripts/ssh-proxmox.sh [command]
|
|
|
|
|
|
|
|
|
|
HOST="${PROXMOX_HOST:-192.168.11.10}"
|
|
|
|
|
USER="${PROXMOX_USER:-root}"
|
|
|
|
|
|
|
|
|
|
# Suppress locale warnings
|
|
|
|
|
export LC_ALL=C
|
|
|
|
|
export LANG=C
|
|
|
|
|
|
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
|
# Interactive SSH (suppress locale warnings)
|
|
|
|
|
ssh "$USER@$HOST" "export LC_ALL=C; export LANG=C; bash"
|
|
|
|
|
else
|
|
|
|
|
# Execute command (suppress locale warnings)
|
|
|
|
|
ssh "$USER@$HOST" "export LC_ALL=C; export LANG=C; $@"
|
|
|
|
|
fi
|
|
|
|
|
|