Last active
August 23, 2021 12:56
-
-
Save abstrask/112e64b046c449a29b188719ff541dd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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