Skip to content

Instantly share code, notes, and snippets.

@f-bader
Created May 3, 2018 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-bader/a682813a0466f2b304f750cd0b5ea267 to your computer and use it in GitHub Desktop.
Save f-bader/a682813a0466f2b304f750cd0b5ea267 to your computer and use it in GitHub Desktop.
OpenSSH Server auf Windows 1709+ aktivieren
# OpenSSH Server installieren
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Dienst starten
Start-Service sshd
# Starttyp auf "Automatisch" stellen
Set-Service sshd -StartupType Automatic
Set-Service ssh-agent -StartupType Automatic
# PowerShell Core als Default Shell nutzen
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\6-preview\pwsh.exe" -PropertyType String -Force
# PowerShell Core als Subsystem hinzufügen
notepad "C:\ProgramData\ssh\sshd_config"
# Folgende Zeile im Bereich Subsystem ohne führende Raute einfügen
#Subsystem powershell C:/Program Files/PowerShell/6-preview/pwsh.exe -sshs -NoLogo -NoProfile
# Dienst neustarten
Restart-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment