PowerShell / PowerShell/Win32-OpenSSH
If the system reboots or shuts down with the SSHD service running, an error ID 7031 will be logged to the Event Log.
Open
Nobody has claimed this yet.
0 - Backlog
Area-Logging/Diagnostics
Area-sshd
Investigate
Issue-Bug
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
- Download msi version of the OpenSSH for Windows
- Install OpenSSH for Windows
- Start OpenSSH SSH Server service.
- Shutdown or Restart Windows
Expected behavior
No error or warning events should be logged to the Event Log for SSHD services.
Actual behavior
You can see ID 7031 Error Event on System Event Log like as following.
Log Name: System
Source: Service Control Manager
Date: 10/31/2023 8:50:51 PM
Event ID: 7031
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ws2022eng
Description:
The OpenSSH SSH Server service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 0 milliseconds: Restart the service.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7031</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2023-11-01T03:50:51.7542233Z" />
<EventRecordID>1250</EventRecordID>
<Correlation />
<Execution ProcessID="744" ThreadID="5784" />
<Channel>System</Channel>
<Computer>ws2022eng</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">OpenSSH SSH Server</Data>
<Data Name="param2">1</Data>
<Data Name="param3">0</Data>
<Data Name="param4">1</Data>
<Data Name="param5">Restart the service</Data>
<Binary>73007300680064000000</Binary>
</EventData>
</Event>
Error details
No response
Environment data
PS C:\Users\Administrator> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.20348.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version
9.4.0.0
Visuals
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
Reproduce the shutdown or restart scenario using the MSI-installed OpenSSH SSH Server service on Windows and inspect the System Event Log for event 7031. Investigate the service shutdown behavior and verify that normal system shutdown no longer records an unexpected-termination error for SSHD.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100