PowerShell / PowerShell/Win32-OpenSSH
Manage service recovery options to avoid service restart loop
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Summary of the new feature / enhancement
If the sshd service fails to start it will not fail as all service recovery options are set to restart the service. This creates a loop of service restarts. As every service restart is logged - the event log will be filled with service restart log events ~ 1000 log entries per minute
PS C:\> sc qfailure sshd
[SC] QueryServiceConfig2 SUCCESS
SERVICE_NAME: sshd
RESET_PERIOD (in seconds) : 86400
REBOOT_MESSAGE :
COMMAND_LINE :
FAILURE_ACTIONS : RESTART -- Delay = 0 milliseconds.
RESTART -- Delay = 0 milliseconds.
RESTART -- Delay = 0 milliseconds.
Suggestion:
- Change the delays to 60000 for the first two failure actions
- Change the third action to "Take no Action"
Proposed technical implementation details (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where the Windows sshd service recovery actions are configured. Use sc qfailure sshd to inspect the current settings and verify the requested delays and final no-action behavior. Done means a failed sshd service no longer restarts in a tight loop and the recovery configuration matches the suggestion.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100