Skip to content

Commit 654a9fb

Browse files
committed
AB#7238: Enable OpenSSH verbose logging
New article for [CI 7238](https://dev.azure.com/KMOps/ContentExperience/_queries/edit/7238)
1 parent 91469bf commit 654a9fb

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: How to enable OpenSSH verbose logging
3+
description: Explains how to enable verbose logging for the OpenSSH service.
4+
ms.date: 10/03/2025
5+
manager: dcscontentpm
6+
audience: itpro
7+
ms.topic: troubleshooting
8+
ms.reviewer: kaushika, warrenw, v-appelgatet
9+
ms.custom:
10+
- sap:system management components\openssh (including sftp)
11+
- pcy:WinComm User Experience
12+
appliesto:
13+
- ✅ <a href=https://learn.microsoft.com/windows/release-health/windows-server-release-info target=_blank>Supported versions of Windows Server</a>
14+
- ✅ <a href=https://learn.microsoft.com/windows/release-health/supported-versions-windows-client target=_blank>Supported versions of Windows Client</a>
15+
---
16+
# How to enable OpenSSH verbose logging
17+
18+
To enable logging, modify the sshd_config file and restart the OpenSSH service.
19+
20+
1. Using an Administrator-level account, open a text editor, and then open **%ProgramData%\ssh\sshd_config**. The default text of the log section should resemble the following excerpt:
21+
22+
```output
23+
# Logging
24+
#SyslogFacility AUTH
25+
#LogLevel INFO
26+
```
27+
28+
1. To enable verbose logging, edit the text to resemble the following excerpt:
29+
30+
```output
31+
# Logging
32+
SyslogFacility AUTH
33+
LogLevel VERBOSE
34+
```
35+
36+
> [!NOTE]
37+
> By default, the logs go to Windows Event Viewer. To record a log file, instead, use `SyslogFacility LOCAL0`. The OpenSSH service records log files in %ProgramData%\ssh\logs.
38+
39+
1. Save and close the sshd_config file.
40+
41+
1. To restart the OpenSSH service, open a Windows Command Prompt window, and then run the following command:
42+
43+
```console
44+
NET STOP "OpenSSH SSH Server" && NET START "OpenSSH SSH Server"
45+
```
46+
47+
After the service restarts, it generates verbose log data.
48+
49+
For more information about configuring OpenSSH, see the [Windows configurations in sshd_config](/windows-server/administration/OpenSSH/openssh-server-configuration#windows-configurations-in-sshd_config) section of "OpenSSH Server configuration for Windows Server and Windows."

0 commit comments

Comments
 (0)