Skip to content

Instantly share code, notes, and snippets.

@abstrask
Last active August 23, 2021 12:56
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 abstrask/112e64b046c449a29b188719ff541dd7 to your computer and use it in GitHub Desktop.
Save abstrask/112e64b046c449a29b188719ff541dd7 to your computer and use it in GitHub Desktop.
# https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration
# Install OpenSSH client and server
Get-WindowsCapability -Online -Name OpenSSH* | Add-WindowsCapability -Online
# Set default SHH shell to PowerShell Core
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "${env:ProgramFiles}\PowerShell\7\pwsh.exe" -PropertyType String -Force
# Set the ssh-agent service to be started automatically
Get-Service -Name ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
# Start OpenSSH daemon
Start-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment