--- name: windows-openssh description: Use system OpenSSH (bare `ssh`); never Git for Windows SSH; the backslash hook blocks full Windows paths applies-to: all --- # SSH on Windows ## Use the system OpenSSH client The correct SSH binary on Windows is the system-installed OpenSSH at: ``` C:\Windows\System32\OpenSSH\ssh.exe ``` Do not use Git for Windows SSH (`C:\Program Files\Git\usr\bin\ssh.exe`). The system OpenSSH has proper Windows integration, correct key handling, and is the version that works with the Windows OpenSSH registry for key agent. ## Use bare `ssh`, not the full path The pre-bash-backslash hook at `.claude/hooks/pre-bash-backslash.sh` blocks any Bash command that contains Windows-style backslash paths (e.g., `C:\Windows\System32\OpenSSH\ssh.exe`). This hook exists to prevent accidental backslash path usage in Git Bash, which interprets `\` as escape sequences. The system OpenSSH is on `PATH` in Git Bash, so use the bare command: ```bash # Correct — uses system OpenSSH via PATH ssh guru@172.16.3.30 "sudo /opt/gururmm/build-server.sh" ssh -i C:/Users/guru/.ssh/id_ed25519 guru@172.16.3.30 "command" # Wrong — full backslash path blocked by hook C:\Windows\System32\OpenSSH\ssh.exe guru@172.16.3.30 "command" ``` Note: forward-slash paths are fine in Git Bash: ```bash # This works (forward slashes) "C:/Windows/System32/OpenSSH/ssh.exe" guru@172.16.3.30 "command" # But bare ssh is simpler and preferred ``` ## Key file paths SSH keys are stored in `C:/Users/guru/.ssh/` — use forward slashes when specifying `-i`: ```bash ssh -i C:/Users/guru/.ssh/id_ed25519 guru@172.16.3.30 "command" ``` ## Known servers | Host | IP | User | Auth | |------|----|------|------| | Saturn / GuruRMM server | 172.16.3.30 | guru | SSH key (id_ed25519) | | Pluto / build server | 172.16.3.36 | Administrator | Password (vault) | | Jupiter / Unraid | 172.16.3.20 | root | Password (vault) | For password auth (Pluto), use paramiko in Python when interactive stdin is not available — `sshpass` is not installed in the Git Bash environment. ## PuTTY tools For servers requiring interactive key acceptance or PuTTY-specific features (IX server): - `pscp.exe` for file transfer - `plink.exe` for commands Both are in `C:/Program Files/PuTTY/` — use forward slashes or quote with double quotes when calling from Git Bash.