File: enable_sshd.ps1

package info (click to toggle)
gitlab-ci-multi-runner 14.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,248 kB
  • sloc: sh: 1,694; makefile: 384; asm: 79; ruby: 68
file content (12 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# Taken from https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
# We need to make sure the latest updates are installed as mentioned in https://github.com/MicrosoftDocs/windowsserverdocs/issues/2074

Write-Output "Enabling OpenSSH"

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

# Set services to start automatically on boot.
Set-Service sshd -StartupType Automatic

# Start the services for the first time.
Start-Service sshd