PowerShell / PowerShell/Win32-OpenSSH

OpenSSH fails to authenticate user with AD group

Open
#2,038 3 comments 0 reactions 2 assignees View on GitHub

@vthiebaut10 is already working on this.

Since Mar 6, 2023.

Area-Authentication Area-sshd Issue-Bug Waiting on Author
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

I have installed and setup OpenSSH on Windows 2019. I have edited the sshd_config file to allow access to a particular AD group as shown below :

AllowGroups domain\group_name

When I try to login to the server using my WinSCP, it authenticates successfully when I just provide the user ID without the domain name or user ID with the domain as the prefix Ex : user1 or domain\user1 and not user1@domain. However, when I enter user1@domain instead of just user1, it fails to authenticate and log me into the server. Subsequently, when I try the first method of using just user1, it continues to fail to authenticate. At this point I am forced to reinstall OpenSSH as restarting the sshd service or the system has no effect.

Expected behavior
The expected behavior should be such that user1, domain\user1 as well as user1@domain should be authenticated successfully while logging into the server using WinSCP.
Actual behavior
However, only the first two methods work successfully while the third method fails.
Error details

No response

Environment data
Name                           Value                                                                                                                                                                                                                             
----                           -----                                                                                                                                                                                                                             
PSVersion                      5.1.17763.3770                                                                                                                                                                                                                    
PSEdition                      Desktop                                                                                                                                                                                                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                                           
BuildVersion                   10.0.17763.3770                                                                                                                                                                                                                   
CLRVersion                     4.0.30319.42000                                                                                                                                                                                                                   
WSManStackVersion              3.0                                                                                                                                                                                                                               
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                                               
SerializationVersion           1.1.0.1
Version

5.1.17763.3770

Visuals

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.