Stern inaktivStern inaktivStern inaktivStern inaktivStern inaktiv
 

# 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
Quelle: https://gist.github.com/f-bader/a682813a0466f2b304f750cd0b5ea267#file-enable-opensshserver-ps1

# 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

Quelle: https://gist.github.com/f-bader/a682813a0466f2b304f750cd0b5ea267#file-enable-powershellcoreopenssh-ps1

 

 

Copyright © winxperts4all.com. All Rights Reserved.