Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Last active November 26, 2020 10:59
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 virtualhobbit/4f43e9823939c58ed1208a8305da61f5 to your computer and use it in GitHub Desktop.
Save virtualhobbit/4f43e9823939c58ed1208a8305da61f5 to your computer and use it in GitHub Desktop.
# Install OenSSH
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
# Set service to automatic and start
Set-Service sshd -StartupType Automatic
Start-Service sshd
# Configure PowerShell as the default shell
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
# Restart the service
Restart-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment