To enable verbose logging for the OpenSSH Server service, modify the sshd_config file, and restart the OpenSSH Server service. Follow these steps:
-
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:
# Logging #SyslogFacility AUTH #LogLevel INFO -
To enable verbose logging, edit the text to resemble the following excerpt:
# Logging SyslogFacility AUTH LogLevel VERBOSE[!NOTE]
By default, the OpenSSH Server service sends logs to Windows Event Viewer. To record a log file instead, useSyslogFacility LOCAL0instead ofSyslogFacility AUTHin sshd_config. The OpenSSH service records log files in %ProgramData%\ssh\logs. -
Save and close the sshd_config file.
-
To restart the OpenSSH Server service, open a Windows Command Prompt window, and then run the following command:
NET STOP "OpenSSH SSH Server" && NET START "OpenSSH SSH Server"
After the service restarts, it generates verbose log data.
For more information about how to configure OpenSSH, see the Windows configurations in sshd_config section of "OpenSSH Server configuration for Windows Server and Windows."
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
