Files
dyolink/infrastructure/scripts/copy-prod-backup-askpass.cmd

5 lines
456 B
Batchfile

@echo off
rem OpenSSH reads the production SSH password from stdout. Nothing else is printed.
chcp 65001 >nul
powershell.exe -NoLogo -NoProfile -NonInteractive -Command "$p = [IO.File]::ReadAllText('C:\dyolink\secrets\nudentic-ssh-password.txt'); if ($p.Length -gt 0 -and [int]$p[0] -eq 0xFEFF) { $p = $p.Substring(1) }; $p = $p.TrimEnd([char]13, [char]10); [Console]::OutputEncoding = New-Object System.Text.UTF8Encoding $false; [Console]::Out.Write($p)"