Add build files with SSH client, VPN scripts, and auto-setup
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
Includes: - Dockerfile extending dockurr/windows with openssh-client - SSH key for Windows VM access - Startup script for network setup and script deployment - VPN automation scripts (vpn-login.js, socks5.js, vpn.bat) - Windows setup scripts (install-nodejs.ps1, setup-autologin-sshd.ps1, setup-ssh-keys.ps1) - Technical README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
32
apps/rego-tunnel/build/scripts/setup-ssh-keys.ps1
Normal file
32
apps/rego-tunnel/build/scripts/setup-ssh-keys.ps1
Normal file
@@ -0,0 +1,32 @@
|
||||
# Setup SSH Keys for alexz user
|
||||
# Run as Administrator in PowerShell
|
||||
|
||||
$PublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGHUQnw0WfeFRQx76UlImXXhu3xeOH41PmDRid8pWK1D alexz@AZawPC-P16S"
|
||||
|
||||
Write-Host "=== Setting up SSH Keys ===" -ForegroundColor Cyan
|
||||
|
||||
# User authorized_keys
|
||||
$userSshDir = "C:\Users\alexz\.ssh"
|
||||
$userAuthKeys = "$userSshDir\authorized_keys"
|
||||
|
||||
Write-Host "Creating user .ssh directory..." -ForegroundColor Yellow
|
||||
New-Item -ItemType Directory -Path $userSshDir -Force | Out-Null
|
||||
|
||||
Write-Host "Adding key to user authorized_keys..." -ForegroundColor Yellow
|
||||
Add-Content -Path $userAuthKeys -Value $PublicKey -Force
|
||||
|
||||
# Fix permissions for user file
|
||||
icacls $userAuthKeys /inheritance:r /grant "alexz:F" /grant "SYSTEM:F"
|
||||
|
||||
# Administrator authorized_keys (for admin users)
|
||||
$adminAuthKeys = "C:\ProgramData\ssh\administrators_authorized_keys"
|
||||
|
||||
Write-Host "Adding key to administrators_authorized_keys..." -ForegroundColor Yellow
|
||||
Add-Content -Path $adminAuthKeys -Value $PublicKey -Force
|
||||
|
||||
# Fix permissions for admin file (required by OpenSSH)
|
||||
icacls $adminAuthKeys /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "SSH keys configured!" -ForegroundColor Green
|
||||
Write-Host "You can now SSH in with the id_ed25519-lenovo key." -ForegroundColor Yellow
|
||||
Reference in New Issue
Block a user