Add step 3: generate SSH key if missing (required for upterm publickey auth)

This commit is contained in:
2026-05-11 09:41:16 +02:00
parent 1d4d808d12
commit 6bbcf1a209
+24 -1
View File
@@ -86,12 +86,35 @@ Copy-Item $uptermExe.FullName "C:\Windows\System32\upterm.exe" -Force
Remove-Item $tarGz, $extractDir -Recurse -Force -ErrorAction SilentlyContinue
Write-Host " OK - upterm $version installiert"
# 3. SSH-Key erzeugen (upterm benoetigt publickey-Auth)
Write-Host "[3/3] Pruefe SSH-Key..."
$sshDir = "$env:USERPROFILE\.ssh"
$keyFile = "$sshDir\id_ed25519"
New-Item -ItemType Directory -Force -Path $sshDir | Out-Null
if (Test-Path $keyFile) {
Write-Host " OK (Key vorhanden: $keyFile)"
} else {
$sshKeygen = "$env:SystemRoot\System32\OpenSSH\ssh-keygen.exe"
if (-not (Test-Path $sshKeygen)) { $sshKeygen = "ssh-keygen" }
Write-Host " Generiere neuen ed25519-Key..."
& $sshKeygen -t ed25519 -N '""' -f $keyFile 2>&1 | Out-Null
if (Test-Path $keyFile) {
Write-Host " OK (Key erstellt: $keyFile)"
} else {
Write-Host " WARNUNG: ssh-keygen nicht verfuegbar."
Write-Host " Bitte OpenSSH-Client installieren:"
Write-Host " Einstellungen > Apps > Optionale Features > OpenSSH-Client"
Write-Host " Danach: ssh-keygen -t ed25519 -N """" -f $keyFile"
}
}
Write-Host ""
Write-Host "============================================================"
Write-Host " Installation abgeschlossen!"
Write-Host "============================================================"
Write-Host ""
Write-Host " PowerShell NEU STARTEN, dann Session teilen mit:"
Write-Host " Session teilen mit:"
Write-Host ""
Write-Host " upterm host --server ssh://upterm.ebesch.de:2222 --accept"
Write-Host ""