Files
init.sh/init.ps1
Christer Warén 9d8e3d0cff Init.ps1 Update
2025-11-01 11:49:31 +02:00

34 lines
733 B
PowerShell

echo ""
echo ""
echo ""
echo "=============================="
echo ""
echo "Waren Init"
echo ""
echo "=============================="
echo ""
echo ""
echo "Generating SSH Key"
New-Item -ItemType Directory -Path "$Env:USERPROFILE\.ssh\keys" -Force
ssh-keygen -f "$Env:USERPROFILE\.ssh\keys\infra" -t ed25519 -C "$Env:USERDOMAIN"
echo ""
echo ""
echo "Copy SSH Key"
Get-Content "$Env:USERPROFILE\.ssh\keys\infra.pub"
echo ""
echo ""
echo "Install OpenSSH Server"
Add-WindowsCapability -Online -Name OpenSSH.Server
echo ""
echo ""
echo "Enable OpenSSH Server"
Set-Service -Name sshd -StartupType 'Automatic'
echo ""
echo ""
echo "Start OpenSSH Server"
Start-Service -Name sshd
echo ""
echo ""
echo "Install Debian"
wsl --install Debian