Fix deploy.ps1 to use OpenSSH instead of PuTTY tools for passwordless access

This commit is contained in:
2026-01-18 15:25:59 -07:00
parent a6eedc1b77
commit 9baa4f0c79
3 changed files with 353 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ foreach ($file in $filesToDeploy) {
$remoteTempPath = "/tmp/deploy_$(Split-Path $file -Leaf)"
Write-Host " Copying $file..." -ForegroundColor Gray
pscp $localPath "${RMM_HOST}:${remoteTempPath}" 2>&1 | Out-Null
scp "$localPath" "${RMM_HOST}:${remoteTempPath}" 2>&1 | Out-Null
if ($LASTEXITCODE -ne 0) {
Write-Host "[ERROR] Failed to copy $file" -ForegroundColor Red
@@ -129,7 +129,7 @@ foreach ($file in $filesToDeploy) {
$fullCommand = ($deployCommands -join " && ") + " && echo 'Files deployed'"
plink $RMM_HOST $fullCommand
ssh $RMM_HOST $fullCommand
if ($LASTEXITCODE -ne 0) {
Write-Host "[ERROR] Failed to move files to production" -ForegroundColor Red
exit 1
@@ -139,7 +139,7 @@ Write-Host ""
# Step 7: Restart API service
Write-Host "[7/9] Restarting API service..." -ForegroundColor Yellow
plink $RMM_HOST "systemctl restart claudetools-api && sleep 3 && echo 'Service restarted'"
ssh $RMM_HOST "systemctl restart claudetools-api && sleep 3 && echo 'Service restarted'"
if ($LASTEXITCODE -ne 0) {
Write-Host "[ERROR] Failed to restart service" -ForegroundColor Red
exit 1