From 2310372153518acc42d6dffe3cd86d88e3185442 Mon Sep 17 00:00:00 2001 From: OpenCode Bot Date: Wed, 29 Apr 2026 22:43:26 +0800 Subject: [PATCH] chore(security): remove hard-coded SSH password from repo --- setup-ssh.ps1 | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 setup-ssh.ps1 diff --git a/setup-ssh.ps1 b/setup-ssh.ps1 deleted file mode 100644 index 0e17f59..0000000 --- a/setup-ssh.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# PowerShell script to copy SSH public key to remote server -# Requires: PowerShell 5.1+ and .NET Framework - -$remoteHost = "23.226.133.121" -$remotePort = "10022" -$remoteUser = "root" -$remotePassword = "xaj2h4v17CRYF52BUa" -$publicKeyPath = "$env:USERPROFILE\.ssh\id_rsa.pub" - -# Read public key -$publicKey = Get-Content $publicKeyPath -Raw - -# Use plink if available, otherwise provide manual instructions -$plink = Get-Command plink -ErrorAction SilentlyContinue - -if ($plink) { - Write-Host "Using plink to copy public key..." - $cmd = "echo '$publicKey' | plink -P $remotePort -pw $remotePassword $remoteUser@$remoteHost `"mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys`"" - Invoke-Expression $cmd -} else { - Write-Host "plink not found. Please manually add the public key to the remote server:" - Write-Host "" - Write-Host "1. Login to the remote server:" - Write-Host " ssh -p $remotePort $remoteUser@$remoteHost" - Write-Host " (Password: $remotePassword)" - Write-Host "" - Write-Host "2. Create .ssh directory if not exists:" - Write-Host " mkdir -p ~/.ssh && chmod 700 ~/.ssh" - Write-Host "" - Write-Host "3. Add the following public key to ~/.ssh/authorized_keys:" - Write-Host " (create the file if not exists, and chmod 600 ~/.ssh/authorized_keys)" - Write-Host "" - Write-Host "Public key content:" - Write-Host "==========================================" - Write-Host $publicKey - Write-Host "==========================================" - Write-Host "" - Write-Host "4. After adding, test with:" - Write-Host " ssh -p $remotePort $remoteUser@$remoteHost" -}