Skip to content

Instantly share code, notes, and snippets.

@oleksis
Created April 9, 2022 19:25
Show Gist options
  • Save oleksis/bcf2cc3d7a9872cbe3f991d12766d4c0 to your computer and use it in GitHub Desktop.
Save oleksis/bcf2cc3d7a9872cbe3f991d12766d4c0 to your computer and use it in GitHub Desktop.
Configuring OpenSSH-Server (sshd) on Windows 11

Configuring OpenSSH-Server (sshd) on Windows 11

Install the OpenSSH Server

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Start the sshd service

Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'

Launch PowerShell pwsh as the default shell rather than cmd

New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\PowerShell\7\pwsh.exe" -PropertyType String -Force

Check pwsh it's set

Get-Item -Path "HKLM:\SOFTWARE\OpenSSH"

Links

OpenSSH using PowerShell Configuring OpenSSH-Server (sshd) on Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment