Compare commits
1 Commits
6fc342bc1b
...
3606f4bbb9
Author | SHA1 | Date | |
---|---|---|---|
3606f4bbb9 |
@ -1,3 +1,10 @@
|
|||||||
|
[CmdletBinding()]
|
||||||
|
Param(
|
||||||
|
[Parameter(Mandatory=$true)]
|
||||||
|
[String]$email,
|
||||||
|
[String]$sshKeyType = "ed25519"
|
||||||
|
)
|
||||||
|
|
||||||
# Install Chocolatey
|
# Install Chocolatey
|
||||||
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||||
|
|
||||||
@ -6,18 +13,14 @@ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
|
|||||||
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
|
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
|
||||||
|
|
||||||
# Install OpenSSH and start service
|
# Install OpenSSH and start service
|
||||||
choco install "--package-parameters=/SSHServerFeature" openssh
|
choco install --yes "--package-parameters=/SSHServerFeature" openssh
|
||||||
Start-Service sshd
|
Start-Service sshd
|
||||||
Set-Service -Name sshd -StartupType 'Automatic'
|
Set-Service -Name sshd -StartupType 'Automatic'
|
||||||
|
|
||||||
# generate keys and authorize them
|
# generate keys and authorize them
|
||||||
# TODO: Ask for email address to use, make sshKeyType optional
|
ssh-keygen -t "$sshKeyType" -C "$email" -f "$env:USERPROFILE/.ssh/$sshKeyType"
|
||||||
$sshKeyType = "ed25519"
|
|
||||||
ssh-keygen -t "$sshKeyType" -C "benie@infektor.net" -N '' -f "$env:USERPROFILE/.ssh/$sshKeyType"
|
|
||||||
# TODO: authorize public key for admin
|
# TODO: authorize public key for admin
|
||||||
|
|
||||||
# Install Windows-Terminal and Debian
|
# Install Windows-Terminal and Debian
|
||||||
choco install microsoft-windows-terminal
|
choco install --yes microsoft-windows-terminal
|
||||||
wsl --install --distribution Debia
|
wsl --install --distribution Debia
|
||||||
|
|
||||||
Restart-Computer
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user