The OpenSSH SSH Server service on Windows 11 failing with error 1067 is usually caused by configuration or permission issues. Please try the following steps to resolve it:
- Verify OpenSSH Installation
Run in PowerShell (Admin):
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
If missing, reinstall using:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Check Configuration
Open C:\ProgramData\ssh\sshd_config and ensure Port 22 is correctly set.
- Reset Service Permissions
Run in PowerShell (Admin):
icacls "C:\ProgramData\ssh" /grant "NT SERVICE\SSHD:(OI)(CI)F" /T
sc.exe config sshd obj="NT AUTHORITY\LocalService" type= own
net start sshd
- Regenerate SSH Host Keys
cd C:\Windows\System32\OpenSSH
ssh-keygen -A
net start sshd
- Check Logs for Errors
Event Viewer → Windows Logs → Application → Look for sshd errors.
Run in PowerShell (Admin):
Get-Content "C:\ProgramData\ssh\logs\sshd.log" -Tail 50
- Reinstall OpenSSH (If Needed)
Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Restart-Computer
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
If the issue persists, please share the error logs for further analysis.
Best regards,
Rosy Yuan