Files
MajorWiki/05-troubleshooting/networking/windows-sshd-stops-after-reboot.md
majorlinux 6999b4ae6d wiki: update SSH docs with bash.exe default shell fix and Windows admin key auth
- ssh-config-key-management: add Windows OpenSSH admin user key auth section
  (administrators_authorized_keys, BOM-free writing, ACL requirements)
- windows-openssh-wsl-default-shell: add bash.exe as recommended fix (Option 1),
  demote PowerShell to Option 2, add shell-not-found diagnostic tip
- windows-sshd-stops-after-reboot: fix stale wsl.exe reference to bash.exe
- index/README: update Recently Updated table and article descriptions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 22:01:36 -04:00

2.8 KiB

title, domain, category, tags, status, created, updated
title domain category tags status created updated
Windows OpenSSH Server (sshd) Stops After Reboot troubleshooting networking
windows
openssh
sshd
reboot
majorrig
published 2026-04-02 2026-04-07T21:58

Windows OpenSSH Server (sshd) Stops After Reboot

🛑 Problem

SSH connections to MajorRig from a mobile device or Tailscale client time out on port 22. No connection refused error — just a timeout. The OpenSSH Server service is installed but not running.


🔍 Diagnosis

From an elevated PowerShell on MajorRig:

Get-Service sshd

If the output shows Stopped, the service is not running. This is the cause of the timeout.


Fix

Run the following from an elevated PowerShell (Win+X → Terminal (Admin)):

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

The final command should confirm Running. SSH connections will resume immediately — no reboot required.


🔄 Why This Happens

Trigger Reason
Windows Update reboot If sshd startup type is Manual, it won't restart after a reboot
WSL2 export/import/rebuild WSL2 reinstall operations often involve reboots that expose the same issue
Fresh Windows install OpenSSH Server is installed but startup type defaults to Manual

The Windows OpenSSH Server is installed as a Windows Feature (Add-WindowsCapability), not a WSL2 package. It runs entirely on the Windows side. However, its default startup type is Manual, meaning it will not survive a reboot unless explicitly set to Automatic.


⚠️ Key Notes

  • This is a Windows-side issue — WSL2 itself is unaffected. The service must be started and configured from Windows, not from within WSL2.
  • Elevated PowerShell requiredStart-Service and Set-Service for sshd will return "Access is denied" if run without Administrator privileges.
  • Port 2222 was retired (2026-03-25) — the bypass port 2222 on MajorRig is no longer in use. The entire fleet now uses port 22 uniformly after the Tailscale SSH auth fix. Only port 22 needs to be verified when troubleshooting sshd.
  • Default shell still works once fixed — MajorRig's sshd is configured to use bash.exe (WSL shim) as the default shell, dropping SSH sessions directly into WSL2/Bash. This config is preserved across service restarts. See WSL default shell troubleshooting for why bash.exe is used instead of wsl.exe.

🔎 Quick Reference

# Check status (run as Admin)
Get-Service sshd

# Start and set to auto-start (run as Admin)
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic

# Verify firewall rule exists
Get-NetFirewallRule -DisplayName "*ssh*" | Select DisplayName, Enabled, Direction, Action