From 8652744954eff5e338a26d3bbfe1eb1069f728e3 Mon Sep 17 00:00:00 2001 From: orbitalo Date: Wed, 13 May 2026 10:40:35 +0000 Subject: [PATCH] tmp: Cleanup Setup-Script (nicht mehr benoetigt) --- tmp/setup-cursor-ssh.ps1 | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 tmp/setup-cursor-ssh.ps1 diff --git a/tmp/setup-cursor-ssh.ps1 b/tmp/setup-cursor-ssh.ps1 deleted file mode 100644 index 57d759dc8..000000000 --- a/tmp/setup-cursor-ssh.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# Setup SSH-Key fuer Cursor-Agent Zugang zum KI-Server -# Muss in ADMIN-PowerShell laufen! - -$ErrorActionPreference = 'Stop' - -Write-Host '== Pruefe Admin-Rechte ==' -ForegroundColor Cyan -$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator') -if (-not $isAdmin) { Write-Host 'FEHLER: Bitte PowerShell als Administrator starten!' -ForegroundColor Red; exit 1 } -Write-Host 'OK: Admin-Rechte vorhanden' -ForegroundColor Green - -Write-Host '== Hole Cursor-Public-Key vom Forgejo ==' -ForegroundColor Cyan -$key = (Invoke-WebRequest -UseBasicParsing 'https://git.orbitalo.net/orbitalo/homelab-brain/raw/branch/main/tmp/pve-hetzner-cursor.pub').Content.Trim() -Write-Host "Key geholt: $($key.Substring(0,40))..." - -$path = 'C:\ProgramData\ssh\administrators_authorized_keys' -Write-Host "== Pruefe ob Key bereits eingetragen in $path ==" -ForegroundColor Cyan -if (Test-Path $path) { - $existing = Get-Content $path -Raw - if ($existing -match [regex]::Escape($key.Substring(0,80))) { - Write-Host 'Key ist BEREITS eingetragen, ueberspringe Append' -ForegroundColor Yellow - } else { - Add-Content -Path $path -Value $key - Write-Host 'Key wurde angehaengt' -ForegroundColor Green - } -} else { - Set-Content -Path $path -Value $key - Write-Host 'Datei neu erstellt mit Key' -ForegroundColor Green -} - -Write-Host '== Setze Permissions (nur Administrators + SYSTEM) ==' -ForegroundColor Cyan -icacls $path /inheritance:r /grant '*S-1-5-32-544:F' '*S-1-5-18:F' | Out-Null -Write-Host 'OK: Permissions gesetzt' -ForegroundColor Green - -Write-Host '== Verifikation: Inhalt der Datei ==' -ForegroundColor Cyan -Get-Content $path | ForEach-Object { Write-Host " $_" } - -Write-Host '' -Write-Host '=== FERTIG ===' -ForegroundColor Green -Write-Host 'Sag dem Cursor-Agent Bescheid, dann testet er.' -ForegroundColor Green