Skip to content

Commit 7a55f93

Browse files
authored
Merge pull request #9810 from v-tappelgate/AB#7238-Enable-openssh-verbose-logging
AB#7238: Enable OpenSSH verbose logging
2 parents 58e6dd1 + 026a7c3 commit 7a55f93

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

support/windows-client/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,8 @@ items:
10811081
items:
10821082
- name: Can't install OpenSSH features
10831083
href: ../windows-server/system-management-components/cant-install-openssh-features.md?context=/troubleshoot/windows-client/context/context
1084+
- name: Enable OpenSSH verbose logging
1085+
href: ../windows-server/system-management-components/enable-openssh-verbose-logging.md?context=/troubleshoot/windows-client/context/context
10841086
- name: OpenSSH client can't connect to a server via SSH
10851087
href: ../windows-server/system-management-components/open-client-can-not-connect-server.md?context=/troubleshoot/windows-client/context/context
10861088
- name: PowerShell
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/07/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 verbose logging for the OpenSSH Server service, modify the sshd_config file, and restart the OpenSSH Server service. Follow these steps:
19+
20+
1. Use an administrator-level account to open a text editor, and then open **%ProgramData%\ssh\sshd_config**. The default text of the "Logging" 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 OpenSSH Server service sends logs to Windows Event Viewer. To record a log file instead, use `SyslogFacility LOCAL0` instead of `SyslogFacility AUTH` in sshd_config. 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 Server 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 how to configure 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."

support/windows-server/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,6 +2598,8 @@ items:
25982598
items:
25992599
- name: Can't install OpenSSH Features
26002600
href: ./system-management-components/cant-install-openssh-features.md
2601+
- name: Enable OpenSSH verbose logging
2602+
href: ./system-management-components/enable-openssh-verbose-logging.md
26012603
- name: OpenSSH client can't connect to a server via SSH
26022604
href: ./system-management-components/open-client-can-not-connect-server.md
26032605
- name: PowerShell

0 commit comments

Comments
 (0)