TechBuzzPro

Disable SSH Server on Windows 10 – Quick Guide

· 5 min read · Windows & PC

In this article
  1. Step‑by‑Step
  2. To uninstall the feature entirely
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can disable the SSH server in Windows 10 by stopping the OpenSSH Server service or removing the feature entirely, which prevents remote command‑line access through the built‑in OpenSSH daemon.

Step‑by‑Step

  1. Open the Services console. Press Win + R, type services.msc and press Enter. The Services window lists every background service that Windows runs.
  2. Locate the OpenSSH Server service. Scroll down until you find OpenSSH SSH Server. The name may appear as sshd in older builds, but the display name will contain "OpenSSH".
  3. Stop the service. Right‑click the entry and choose Stop. This halts the daemon immediately, closing any existing SSH connections.
  4. Disable automatic start. With the same right‑click menu, select Properties. In the Startup type dropdown, change the value from Automatic (or Manual) to Disabled. Click Apply then OK. The service will no longer start when the system boots.
  5. Confirm the change. In the Services list, the OpenSSH SSH Server entry should now show Status: Stopped and Startup Type: Disabled. Close the console.
  6. Optional: Remove the OpenSSH Server feature. If you prefer to uninstall the component completely, open Settings (press Win + I), go to Apps → Optional features. Scroll the list, locate OpenSSH Server, click it, and choose Uninstall. Windows will remove the binaries and registry entries.
  7. Alternative PowerShell method. Open an elevated PowerShell window (right‑click the Start button, choose Windows PowerShell (Admin)). Run the following commands one after another:
    Stop-Service sshd
    Set-Service -Name sshd -StartupType Disabled
    

    To uninstall the feature entirely

    Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    Each command stops the service, disables automatic start, and finally removes the optional capability if you wish.
  8. Verify the service is gone. Run Get-Service sshd in the same PowerShell window. If the service has been removed, you will see an error indicating it cannot be found. If it still appears, repeat the disable step.

Common Mistakes

  • Disabling the wrong service. Windows also includes an OpenSSH Authentication Agent (ssh‑agent). Turning this off does not stop the SSH server; only the OpenSSH SSH Server service matters.
  • Forgetting to change the startup type. Stopping the service works for the current session, but the daemon will start again after a reboot unless the startup type is set to Disabled.
  • Using the wrong PowerShell command. The capability name must match exactly (OpenSSH.Server~~~~0.0.1.0). A typo will cause the command to fail silently, leaving the feature installed.
  • Uninstalling only the client. The optional feature list includes both OpenSSH Client and OpenSSH Server. Removing the client does not affect the server; ensure you target the server entry.

Tips

  • Keep a local administrator account separate from any remote accounts you may have used for SSH. This ensures you can still log in if you accidentally lock yourself out.
  • If you need to re‑enable the server later, simply set the startup type back to Automatic (or Manual) and start the service again from the Services console or with Start-Service sshd.
  • Document the change in your system change‑log. Disabling a network service can affect scripts or automation tools that rely on SSH.
  • When uninstalling via Settings, Windows may schedule the removal for the next reboot. A quick restart after clicking Uninstall confirms the operation.
  • Use the built‑in Windows firewall to block port 22 as an extra layer of protection, even if the service is disabled. Add an inbound rule that denies traffic on TCP port 22.

Troubleshooting

If the SSH server still appears to be running after you have followed the steps above, try the following checks in order.

  1. Restart the computer. Some changes to optional features only take effect after a reboot. After restarting, open services.msc again and verify the status.
  2. Confirm the correct service name. Open PowerShell and run Get-Service | Where-Object {$_.DisplayName -like "*OpenSSH*"}. The output will list any OpenSSH‑related services that remain active.
  3. Check for a second instance. In rare cases, a third‑party SSH daemon (such as Bitvise or freeSSHd) may be installed separately. Look for services named Bitvise SSH Server or similar, and disable them using the same method.
  4. Verify the firewall rule. Open Windows Defender Firewall with Advanced Security, navigate to Inbound Rules, and ensure there is no rule that explicitly allows traffic on port 22. If one exists, disable or delete it.
  5. Re‑run the PowerShell uninstall command. Open an elevated PowerShell window and execute:
    Get-WindowsCapability -Online | Where-Object Name -like "OpenSSH.Server*"
    If the capability shows as Installed, run the Remove-WindowsCapability command again. Watch the output for any error messages.
  6. Check the system log. Open Event Viewer (type eventvwr.msc), expand Windows Logs → System, and look for entries from the source Service Control Manager that mention sshd. Errors here can indicate permission problems that prevented the service from stopping.
  7. Last resort – reset optional features. If the component is corrupted, you can reset the entire optional‑features store by running:
    DISM /Online /Cleanup‑Image /RestoreHealth
    After DISM finishes, repeat the uninstall steps. This process does not affect personal files, but it may reinstall other optional components, so be prepared for a brief download.

Frequently Asked Questions

Is the OpenSSH server installed by default on Windows 10?

Starting with the April 2018 update, Windows 10 includes OpenSSH as an optional feature. It is not enabled automatically; you must add it via Settings or PowerShell before it can accept connections.

Will disabling the SSH server affect other remote‑desktop tools?

No. The SSH service listens on TCP port 22 only. Tools such as Remote Desktop (RDP), VNC, or third‑party management consoles use different ports and are unaffected.

Can I disable the SSH server without administrator rights?

No. Stopping or disabling a Windows service requires administrative privileges. You must be logged in as a member of the Administrators group or use an elevated command prompt.

Do I need to uninstall the client as well?

Uninstalling the client is optional. The client is used for outbound SSH connections from the Windows machine, while the server handles inbound connections. Removing the client does not affect the server’s operation.

What happens to existing SSH sessions when I stop the service?

All active connections are terminated immediately. Users will see a “connection closed” message, and any running commands will be aborted.

Is there a way to re‑enable the server with a single command?

Yes. In an elevated PowerShell window, run:

Enable-WindowsOptionalFeature -Online -FeatureName OpenSSH.Server
Then start the service with Start-Service sshd and set the startup type back to Automatic if you want it to start on boot.