Files
ROMFASTSQL/proxmox/vm109-windows-dr/scripts/add_system_key_dr.ps1
Marius a567f75f25 Reorganize oracle/ and chatbot/ into proxmox/ per LXC/VM structure
- Move oracle/migration-scripts/ to proxmox/lxc108-oracle/migration/
- Move oracle/roa/ and oracle/roa-romconstruct/ to proxmox/lxc108-oracle/sql/
- Move oracle/standby-server-scripts/ to proxmox/vm109-windows-dr/
- Move chatbot/ to proxmox/lxc104-flowise/
- Update proxmox/README.md with new structure and navigation
- Update all documentation with correct directory references
- Remove unused input/claude-agent-sdk/ files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:28:53 +02:00

37 lines
1.9 KiB
PowerShell

# Add PRIMARY SYSTEM user SSH key to DR VM
# Run this on DR VM (10.0.20.37) as Administrator
$systemKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD3EdHswdNDuDC9kJdUli2zGGPVlEWJjmqtb4eABYWwjQnWqjGp8oAFbQ+r2TxR544WtEyhDL9BU6oO3EFH957DBGQJHJvfRgx2VnkNZEzN/XX/7HK6Cp5rlINGGp26PjHulKkZjARmjC3YK0aUFEkiyNyUBqhtQpmcYP4+wjUfiiO2xUkF9mzGplbWGK3ZmEdkWNd5BNddqxmxyLvd2KHAo8F7Vux9SyPWqZ8bwiDyidAMDU7kCXS/RabUMl2LGajzFbRnR87YA7cIaVFl/IWExO/fsYlgkwmmmIAMdjINp0IWDdydnmG1XNNhM8h/BKY/eK3uile8CvyEbmbuf0+ePm3Ex9vTjn4jYN2vFE148FgQGGTibibJ+sXFoQ87VFNGEuog/V0aajVk/xcOihszsEvzD2IV/tSKJFdI6klnYLuieuMZf7Dvs/6sC1l3dnsBtcpvjnU48altRRZvQzaJf3gIkG1lRGBgyW1n+WHe/7StIveYTVNFtx+fcnqB8gm9fZQxBp2WRbLNFpY/Qj+6BF66b1A2ZxH/3F9Z/6VT91EActOf+AMxjsI+09d7IRYIvzr8OxMPYOHU2bglp3o86xZEMUXfcjB8Sw/8KMsCjBp3ABEN9/bwv1496aw9IC67ZBQ2cDDfgdBej5DAkT4NS2XIx7wbM7sBtLYjcXMi7w== administrator@ROA-CARAPETRU2"
$authKeysFile = "C:\ProgramData\ssh\administrators_authorized_keys"
Write-Host "Adding PRIMARY SYSTEM user SSH key to DR VM..." -ForegroundColor Cyan
# Check if key already exists
$currentContent = Get-Content $authKeysFile -ErrorAction SilentlyContinue
if ($currentContent -match "administrator@ROA-CARAPETRU2") {
Write-Host "Key already exists in authorized_keys" -ForegroundColor Yellow
} else {
# Add the key
Add-Content -Path $authKeysFile -Value $systemKey
Write-Host "Key added successfully" -ForegroundColor Green
}
# Show current keys
Write-Host ""
Write-Host "Current authorized keys:" -ForegroundColor Cyan
Get-Content $authKeysFile | ForEach-Object {
if ($_ -match "ssh-rsa .+ (.+)$") {
Write-Host " - $($matches[1])" -ForegroundColor White
}
}
# Restart SSH service
Write-Host ""
Write-Host "Restarting SSH service..." -ForegroundColor Yellow
Restart-Service sshd
Write-Host "SSH service restarted" -ForegroundColor Green
Write-Host ""
Write-Host "Done! SYSTEM user from PRIMARY can now connect via SSH." -ForegroundColor Green