Skip to content

Unable to SSH into Windows Domain server using Domain User #1823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
I1eoThe0ne opened this issue Jun 30, 2021 · 6 comments
Closed

Unable to SSH into Windows Domain server using Domain User #1823

I1eoThe0ne opened this issue Jun 30, 2021 · 6 comments

Comments

@I1eoThe0ne
Copy link

"OpenSSH for Windows" version
OpenSSH_for_Windows_8.1p1, LibreSSL 2.9.2

Server OperatingSystem
Windows Server 2019 Standard

Client OperatingSystem
Windows 10

What is failing
SSH Connection does not esablish - it does not even ask for password or key-files

Expected output
successfull connection

Actual output

Server : fatal: ga_init, unable to resolve user ourDomain\myDomainUser

Client: Connection reset by 10.70.108.76 port 22

client.log
server.log

@bagajjal
Copy link
Collaborator

@I1eoThe0ne - Can you share the output of "whoami /user" on cmd.exe.
Looking at the log file, OpenSSHServer is unable to generate user token..
error 0xC000006D - The attempted logon is invalid. This is either due to a bad username or authentication information.

4216 2021-06-30 18:00:48.875 debug1: generate_s4u_user_token: LsaLogonUser() failed. User 'ourDomain\myDomainUser' Status: 0xC000006D SubStatus 0.
4216 2021-06-30 18:00:48.875 debug3: get_user_token - unable to generate token for user ourDomain\myDomainUser

@akshay8043
Copy link

Hi,

Even I am also unable to configure OpenSSH service using domain account.

Do you know how to run openssh using service account and how to change root/home folder for ssh?

@I1eoThe0ne
Copy link
Author

I1eoThe0ne commented Jul 1, 2021

@I1eoThe0ne - Can you share the output of "whoami /user" on cmd.exe.
Looking at the log file, OpenSSHServer is unable to generate user token..
error 0xC000006D - The attempted logon is invalid. This is either due to a bad username or authentication information.

4216 2021-06-30 18:00:48.875 debug1: generate_s4u_user_token: LsaLogonUser() failed. User 'ourDomain\myDomainUser' Status: 0xC000006D SubStatus 0.
4216 2021-06-30 18:00:48.875 debug3: get_user_token - unable to generate token for user ourDomain\myDomainUser

@bagajjal the open-ssh-server is started as a service (services.msc)
In the logOn Tab "Local System Account" is checked.

I did start it once as user ourDomain\myDomainUser - from the terminal - then it works. But in production I can not start the service using ourDomain.

OpenSshServerServiceLogOn

@bagajjal
Copy link
Collaborator

bagajjal commented Jul 1, 2021

@I1eoThe0ne - How did you install the openssh server? Have you made any installation changes?
Please provide the requested information in the previous post also

@I1eoThe0ne I1eoThe0ne reopened this Jul 5, 2021
@I1eoThe0ne
Copy link
Author

@bagajjal

  • I did share the previous requested information - what are you missing??
  • Yes I did install the openssh server
  • No I did not make any changes

Solution

The computer did not have the rights to reads the desired users Properties - therefore ssh failed with the error message mentioned above.

Giving the Computer permissions to read the properties of the user (ourDomain\myDomainUser) solved the issue - Login is successful :)

For more details view Unable to SSH into Windows Domain server using Domain User

@realslacker
Copy link

I know this is closed, but is there any kind of list of properties that the computer account needs read access to? I have a fairly locked down environment, and I would like to scope this down as much as possible vs. just giving all servers with OpenSSH installed wide open read access to all user accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants