Event ID 2: sshd error message
Windows OpenSSH writes every error-level message as event 2 in the separate OpenSSH/Admin channel; critical (fatal) messages are event 1 in the same channel. As with event 4, the detail is only in the payload text.
- Channel
- OpenSSH/Admin
- Logged by default
- No
- Written on
- Target host
- Volume
- Low
- Provider
- OpenSSH
- Needs a SACL
- No
To have this event
- OpenSSH Server installed (an optional feature on most Windows versions) and the sshd service running
- sshd logging to the event log, which is the default. SyslogFacility LOCAL0 in sshd_config sends it to %ProgramData%\ssh\logs instead
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| process | OpenSSH program that wrote the message, for example sshd |
| payload | Error text, for example 'maximum authentication attempts exceeded for <user> from <ip> port <port> ssh2 [preauth]', or key exchange errors from scanners and clients that disconnect early |
Analyst notes
- 01Collect OpenSSH/Admin as well as Operational: 'maximum authentication attempts exceeded' is logged at error level and lands here, not in event 4.
- 02Repeated key exchange errors from many internet addresses are routine scanning of an exposed port 22; they matter mainly as proof the service is reachable from outside.
- 03When sshd fails to start or a session dies on a fatal error, look for event 1 (Critical) in this channel.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'OpenSSH/Admin' -FilterXPath "*[System[(EventID=2)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Related events
Common questions
- What does Windows event ID 2 mean?
- Windows OpenSSH writes every error-level message as event 2 in the separate OpenSSH/Admin channel; critical (fatal) messages are event 1 in the same channel. As with event 4, the detail is only in the payload text. It is written to the OpenSSH Operational log (OpenSSH/Admin).
- Is event 2 logged by default?
- No. It must be enabled before it is recorded.
- Where is event 2 recorded?
- In the OpenSSH/Admin channel on the target host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWindows OpenSSH writes every error-level message as event 2 in the separate OpenSSH/Admin channel; critical (fatal) messages are event 1 in the same channel. As with event 4, the detail is only in the payload text. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.