kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch18/packer/windows/scripts/ssh_setup.ps1

11 lines
458 B
PowerShell

# set PowerShell as default shell:
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -name Shell -Value 'PowerShell.exe -noExit'
# add SSH:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
# disable firewall :)
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False