PacoLemon

Windows 10 OpenSSH Troubleshoot

September 21, 2021
Last updated on September 21, 2023

Cases

So when I want to install Windows 10 Apps & Feature OpenSSH Server this error pop-up on my screen, it's kinda irritating.

Error message
  • If the error 0x800f0954 occurs installing optional Windows features, it may be because the system is unable to access the Windows Update server. This is especially true in the case of domain-joined computers which is configured to downloads updates from a WSUS server from
  • some articles (Github) saying the cause is after upgrading the version of Windows but anyway, after a bit of searching I found out the solution that work out for me,

Solving

So this was the solution for me that only use SSH to my computer and maybe can be worked out for you too, you can go to this repo magic link fixer or follow the step that exactly the same as the link before,

    Steps

    1. Win32-OpenSSH Github releases can be installed on Windows 7 and up.
    2. Note these considerations and project scope first.
    3. Download the latest build of OpenSSH. To get links to the latest downloads this wiki page.
    4. Extract contents of the latest build to C:\Program Files\OpenSSH (Make sure binary location has the Write permissions to just to SYSTEM, Administrator groups. Authenticated users should and only have Read and Execute.)
    5. In an elevated Powershell console, run the following
      • powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1
    6. Open the firewall for sshd.exe to allow inbound SSH connections
      • New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
    7. Note: New-NetFirewallRule is for Windows 2012 and above servers only. If you're on a client desktop machine (like Windows 10) or Windows 2008 R2 and below, try:
      • netsh advfirewall firewall add rule name=sshd dir=in action=allow protocol=TCP localport=22
    8. Start sshd (this will automatically generate host keys under %programdata%\ssh if they don't already exist)
      • net start sshd

    Optional

    1. To configure a default shell, see here
    2. To setup sshd service to auto-start
      • Set-Service sshd -StartupType Automatic
    3. To migrate sshd configuration from older versions (0.0.X.X), see here

Comments

Explore Blogs