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:
44
apps/rego-tunnel/build/scripts/setup-autologin-sshd.ps1
Normal file
44
apps/rego-tunnel/build/scripts/setup-autologin-sshd.ps1
Normal file
@@ -0,0 +1,44 @@
|
||||
# Setup OpenSSH Server and Auto-Login for alexz
|
||||
# Run as Administrator in PowerShell
|
||||
|
||||
$Username = "alexz"
|
||||
$Password = "Az@83278327$$@@"
|
||||
|
||||
Write-Host "=== Setting up OpenSSH Server ===" -ForegroundColor Cyan
|
||||
|
||||
# Install OpenSSH Server
|
||||
$sshCapability = Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*'
|
||||
if ($sshCapability.State -ne 'Installed') {
|
||||
Write-Host "Installing OpenSSH Server..." -ForegroundColor Yellow
|
||||
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
|
||||
} else {
|
||||
Write-Host "OpenSSH Server already installed" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# Start and enable SSH service
|
||||
Write-Host "Starting SSH service..." -ForegroundColor Yellow
|
||||
Start-Service sshd
|
||||
Set-Service -Name sshd -StartupType 'Automatic'
|
||||
|
||||
# Configure firewall
|
||||
$fwRule = Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue
|
||||
if (-not $fwRule) {
|
||||
Write-Host "Adding firewall rule..." -ForegroundColor Yellow
|
||||
New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
|
||||
}
|
||||
|
||||
Write-Host "OpenSSH Server configured!" -ForegroundColor Green
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "=== Setting up Auto-Login ===" -ForegroundColor Cyan
|
||||
|
||||
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
Set-ItemProperty -Path $RegPath -Name "AutoAdminLogon" -Value "1"
|
||||
Set-ItemProperty -Path $RegPath -Name "DefaultUserName" -Value $Username
|
||||
Set-ItemProperty -Path $RegPath -Name "DefaultPassword" -Value $Password
|
||||
Remove-ItemProperty -Path $RegPath -Name "DefaultDomainName" -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "Auto-login configured for '$Username'!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Setup complete! SSH is now available and auto-login is enabled." -ForegroundColor Green
|
||||
Write-Host "Reboot to test auto-login." -ForegroundColor Yellow
|
||||
Reference in New Issue
Block a user