For Windows users who live in PowerShell. No Git Bash needed. Same safety, same alias, same ssh vps2 afterwards.
Invoke-WebRequest -Uri https://raw.githubusercontent.com/mymyanmarland/vps-connect/main/connect-vps.ps1 -OutFile connect-vps.ps1curl.exe -O https://raw.githubusercontent.com/mymyanmarland/vps-connect/main/connect-vps.ps1Unblock-File .\connect-vps.ps1.\connect-vps.ps1 -Name vps2 -Host <VPS-IP>powershell -ExecutionPolicy Bypass -File .\connect-vps.ps1 -Name vps2 -Host <VPS-IP>ssh vps2Alternative, if you prefer a policy change: Set-ExecutionPolicy -Scope CurrentUser RemoteSigned — a file downloaded with a browser may still need Unblock-File even under RemoteSigned. A file downloaded with Invoke-WebRequest usually does not carry that mark.
.\connect-vps.ps1 -Name vps2 -Host <VPS-IP> — or just .\connect-vps.ps1 and answer the two prompts.ssh vps2 — in PowerShell, or in any terminal that reads the same %USERPROFILE%\.ssh\config file.ssh command instead..pub file (key type + base64) are sent; any trailing comment is dropped, so shell quoting cannot mangle the key.%USERPROFILE%\.ssh\config, and the IdentityFile in that config uses forward slashes, which Windows OpenSSH reads cleanly.VPS-CONNECT-OK test.Try the dry run first: .\connect-vps.ps1 -DryRun -Name vps2 -Host <VPS-IP> — it changes nothing and contacts no VPS.
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0