PowerShell / PowerShell/Win32-OpenSSH

SCP: Authentication Fails for Non-Admin User when SSHD is logging to file

Open
#1,717 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps

Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH

Please answer the following

"OpenSSH for Windows" version
8.1.0.0

Server OperatingSystem
Windows Server 2012 R2 Standard

Client OperatingSystem
Windows 10 Enterprise 2004

What is failing
When sshd_config has SysLogFacility LOCAL0 and LogLevel DEBUG enabled (causing sshd to log to %ProgramData%\ssh\logs\sshd.log), a non-administrative user attempting to do a file copy using scp receives an access denied error. On the SSH server, a 4673 event is generated due to the user not having access to sshd.log.

As a non-admin user does not have write permissions to %ProgramData%\ssh, login fails when the user account is unable to write to sshd.log

This is a non-issue when logging is reverted back to the Windows Event Log.

Expected output

Login and file copy to to succeed

Actual output

Access is Denied

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce with sshd_config using SysLogFacility LOCAL0 and LogLevel DEBUG, a non-administrative account, and scp. Inspect how logging to %ProgramData%\ssh\logs\sshd.log interacts with authentication and file permissions, then verify that login and file copy succeed without granting the user access to sshd.log.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, observability, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.