PowerShell / PowerShell/Win32-OpenSSH

Unable to login with domain user

Open
#1,808 11 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
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
Getting an error while running this

Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Windows Server 2016 Datacenter

Client OperatingSystem
Windows Server 2016 Datacenter

What is failing
Domain Credential Login

Expected output
Domain Users should login successfully

Actual output
6176 2021-06-07 15:01:06.340 debug2: fd 3 setting O_NONBLOCK
6176 2021-06-07 15:01:06.341 debug3: sock_set_v6only: set socket 3 IPV6_V6ONLY
6176 2021-06-07 15:01:06.341 debug1: Bind to port 22 on ::.
6176 2021-06-07 15:01:06.341 Server listening on :: port 22.
6176 2021-06-07 15:01:06.341 debug2: fd 4 setting O_NONBLOCK
6176 2021-06-07 15:01:06.341 debug1: Bind to port 22 on 0.0.0.0.
6176 2021-06-07 15:01:06.341 Server listening on 0.0.0.0 port 22.
6176 2021-06-07 15:01:40.029 debug3: fd 5 is not O_NONBLOCK
6176 2021-06-07 15:01:40.033 debug3: spawning "C:\Program Files\OpenSSH\sshd.exe" -R
6176 2021-06-07 15:01:40.041 debug3: send_rexec_state: entering fd = 8 config len 881
6176 2021-06-07 15:01:40.041 debug3: ssh_msg_send: type 0
6176 2021-06-07 15:01:40.041 debug3: send_rexec_state: done
10668 2021-06-07 15:01:40.087 debug1: inetd sockets after dupping: 4, 4
10668 2021-06-07 15:01:40.087 Connection from 10.235.192.234 port 57671 on 10.235.80.155 port 22
10668 2021-06-07 15:01:40.087 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
10668 2021-06-07 15:01:40.088 debug1: Remote protocol version 2.0, remote software version WinSCP_release_5.17.10
10668 2021-06-07 15:01:40.088 debug1: no match: WinSCP_release_5.17.10
10668 2021-06-07 15:01:40.088 debug2: fd 4 setting O_NONBLOCK
10668 2021-06-07 15:01:40.118 debug3: spawning "C:\Program Files\OpenSSH\sshd.exe" -y
10668 2021-06-07 15:01:40.125 debug2: Network child is on pid 43896
10668 2021-06-07 15:01:40.125 debug3: send_rexec_state: entering fd = 6 config len 881
10668 2021-06-07 15:01:40.125 debug3: ssh_msg_send: type 0
10668 2021-06-07 15:01:40.126 debug3: send_rexec_state: done
10668 2021-06-07 15:01:40.126 debug3: ssh_msg_send: type 0
10668 2021-06-07 15:01:40.126 debug3: ssh_msg_send: type 0
10668 2021-06-07 15:01:40.126 debug3: preauth child monitor started
10668 2021-06-07 15:01:40.156 debug1: list_hostkey_types: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
10668 2021-06-07 15:01:40.156 debug3: send packet: type 20 [preauth]
10668 2021-06-07 15:01:40.156 debug1: SSH2_MSG_KEXINIT sent [preauth]
10668 2021-06-07 15:01:40.156 debug3: receive packet: type 20 [preauth]
10668 2021-06-07 15:01:40.157 debug1: SSH2_MSG_KEXINIT received [preauth]
10668 2021-06-07 15:01:40.157 debug2: local server KEXINIT proposal [preauth]
10668 2021-06-07 15:01:40.157 debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1 [preauth]
10668 2021-06-07 15:01:40.157 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
10668 2021-06-07 15:01:40.157 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
10668 2021-06-07 15:01:40.157 debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
10668 2021-06-07 15:01:40.157 debug2: compression ctos: none,zlib@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: compression stoc: none,zlib@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: languages ctos: [preauth]
10668 2021-06-07 15:01:40.157 debug2: languages stoc: [preauth]
10668 2021-06-07 15:01:40.157 debug2: first_kex_follows 0 [preauth]
10668 2021-06-07 15:01:40.157 debug2: reserved 0 [preauth]
10668 2021-06-07 15:01:40.157 debug2: peer client KEXINIT proposal [preauth]
10668 2021-06-07 15:01:40.157 debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,rsa2048-sha256,rsa1024-sha1,diffie-hellman-group1-sha1 [preauth]
10668 2021-06-07 15:01:40.157 debug2: host key algorithms: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss [preauth]
10668 2021-06-07 15:01:40.157 debug2: ciphers ctos: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth]
10668 2021-06-07 15:01:40.157 debug2: ciphers stoc: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth]
10668 2021-06-07 15:01:40.157 debug2: MACs ctos: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: MACs stoc: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: compression ctos: none,zlib,zlib@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: compression stoc: none,zlib,zlib@openssh.com [preauth]
10668 2021-06-07 15:01:40.157 debug2: languages ctos: [preauth]
10668 2021-06-07 15:01:40.157 debug2: languages stoc: [preauth]
10668 2021-06-07 15:01:40.157 debug2: first_kex_follows 0 [preauth]
10668 2021-06-07 15:01:40.157 debug2: reserved 0 [preauth]
10668 2021-06-07 15:01:40.157 debug1: kex: algorithm: curve25519-sha256@libssh.org [preauth]
10668 2021-06-07 15:01:40.157 debug1: kex: host key algorithm: ssh-ed25519 [preauth]
10668 2021-06-07 15:01:40.157 debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
10668 2021-06-07 15:01:40.157 debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
10668 2021-06-07 15:01:40.157 debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
10668 2021-06-07 15:01:40.167 debug3: receive packet: type 30 [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_sshkey_sign entering [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_request_send entering: type 6 [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_sshkey_sign: waiting for MONITOR_ANS_SIGN [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_request_receive_expect entering: type 7 [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_request_receive entering [preauth]
10668 2021-06-07 15:01:40.171 debug3: mm_request_receive entering
10668 2021-06-07 15:01:40.171 debug3: monitor_read: checking request 6
10668 2021-06-07 15:01:40.171 debug3: mm_answer_sign
10668 2021-06-07 15:01:40.172 debug3: mm_answer_sign: KEX signature 00000229231D5580(83)
10668 2021-06-07 15:01:40.172 debug3: mm_request_send entering: type 7
10668 2021-06-07 15:01:40.172 debug2: monitor_read: 6 used once, disabling now
10668 2021-06-07 15:01:40.172 debug3: send packet: type 31 [preauth]
10668 2021-06-07 15:01:40.173 debug3: send packet: type 21 [preauth]
10668 2021-06-07 15:01:40.173 debug2: set_newkeys: mode 1 [preauth]
10668 2021-06-07 15:01:40.173 debug1: rekey out after 4294967296 blocks [preauth]
10668 2021-06-07 15:01:40.173 debug1: SSH2_MSG_NEWKEYS sent [preauth]
10668 2021-06-07 15:01:40.173 debug1: expecting SSH2_MSG_NEWKEYS [preauth]
10668 2021-06-07 15:01:40.306 debug3: receive packet: type 21 [preauth]
10668 2021-06-07 15:01:40.306 debug1: SSH2_MSG_NEWKEYS received [preauth]
10668 2021-06-07 15:01:40.306 debug2: set_newkeys: mode 0 [preauth]
10668 2021-06-07 15:01:40.306 debug1: rekey in after 4294967296 blocks [preauth]
10668 2021-06-07 15:01:40.306 debug1: KEX done [preauth]
10668 2021-06-07 15:01:40.306 debug3: receive packet: type 5 [preauth]
10668 2021-06-07 15:01:40.306 debug3: send packet: type 6 [preauth]
10668 2021-06-07 15:01:40.318 debug3: receive packet: type 50 [preauth]
10668 2021-06-07 15:01:40.319 debug1: userauth-request for user na\\tanmay.jog service ssh-connection method none [preauth]
10668 2021-06-07 15:01:40.319 debug1: attempt 0 failures 0 [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_getpwnamallow entering [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_request_send entering: type 8 [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_request_receive_expect entering: type 9 [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_request_receive entering [preauth]
10668 2021-06-07 15:01:40.319 debug3: mm_request_receive entering
10668 2021-06-07 15:01:40.319 debug3: monitor_read: checking request 8
10668 2021-06-07 15:01:40.319 debug3: mm_answer_pwnamallow
10668 2021-06-07 15:01:40.319 debug3: Trying to reverse map address 10.235.192.234.
10668 2021-06-07 15:01:40.325 reverse mapping checking getaddrinfo for ip-10-235-192-234.ec2.internal [10.235.192.234] failed.
10668 2021-06-07 15:01:40.326 debug2: parse_server_config: config reprocess config len 881
10668 2021-06-07 15:01:40.326 debug3: checking match for 'User Lana.Brockway' user na\tanmay.jog host 10.235.192.234 addr 10.235.192.234 laddr 10.235.80.155 lport 22
10668 2021-06-07 15:01:40.326 debug3: match not found
10668 2021-06-07 15:01:40.326 debug3: checking match for 'User Tanya.Townes' user na\tanmay.jog host 10.235.192.234 addr 10.235.192.234 laddr 10.235.80.155 lport 22
10668 2021-06-07 15:01:40.326 debug3: match not found
10668 2021-06-07 15:01:40.326 debug3: checking match for 'User Kimberly.Bonebrake' user na\tanmay.jog host 10.235.192.234 addr 10.235.192.234 laddr 10.235.80.155 lport 22
10668 2021-06-07 15:01:40.326 debug3: match not found
10668 2021-06-07 15:01:40.326 debug3: checking match for 'User cloudopssftpadmin' user na\tanmay.jog host 10.235.192.234 addr 10.235.192.234 laddr 10.235.80.155 lport 22
10668 2021-06-07 15:01:40.326 debug3: match not found
10668 2021-06-07 15:01:40.326 debug3: checking match for 'Group administrators' user na\tanmay.jog host 10.235.192.234 addr 10.235.192.234 laddr 10.235.80.155 lport 22
10668 2021-06-07 15:01:40.465 error: lookup_principal_name: User principal name lookup failed for user 'na\tanmay.jog' (explicit: 5, implicit: 5)
10668 2021-06-07 15:01:40.465 debug1: generate_s4u_user_token: LsaLogonUser() failed. User 'na\tanmay.jog' Status: 0xC0000062 SubStatus 0.
10668 2021-06-07 15:01:40.465 debug3: get_user_token - unable to generate token for user na\tanmay.jog
10668 2021-06-07 15:01:42.847 error: lookup_principal_name: User principal name lookup failed for user 'na\tanmay.jog' (explicit: 5, implicit: 5)
10668 2021-06-07 15:01:42.847 debug1: generate_s4u_user_token: LsaLogonUser() failed. User 'na\tanmay.jog' Status: 0xC0000062 SubStatus 0.
10668 2021-06-07 15:01:42.847 error: get_user_token - unable to generate token on 2nd attempt for user na\tanmay.jog
10668 2021-06-07 15:01:42.847 fatal: ga_init, unable to resolve user na\tanmay.jog
10668 2021-06-07 15:01:42.847 debug1: do_cleanup
10668 2021-06-07 15:01:42.847 debug1: Killing privsep child 43896

sshd_cofig

This is the sshd server system-wide configuration file. See

sshd_config(5) for more information.

The strategy used for options in the default sshd_config shipped with

OpenSSH is to specify options with their default value where

possible, but leave them commented. Uncommented options override the

default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey PROGRAMDATA/ssh/ssh_host_rsa_key
#HostKey PROGRAMDATA/ssh/ssh_host_dsa_key
#HostKey PROGRAMDATA/ssh/ssh_host_ecdsa_key
#HostKey PROGRAMDATA/ssh/ssh_host_ed25519_key

Ciphers and keying

#RekeyLimit default none

Logging

SyslogFacility LOCAL0
LogLevel DEBUG3

Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

PubkeyAuthentication yes

The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2

but this is overridden so installations will only check .ssh/authorized_keys

AuthorizedKeysFile .ssh/authorized_keys

#AuthorizedPrincipalsFile none

For this to work you will also need host keys in %programData%/ssh/ssh_known_hosts

#HostbasedAuthentication no

Change to yes if you don't trust ~/.ssh/known_hosts for

HostbasedAuthentication

#IgnoreUserKnownHosts no

Don't read the user's ~/.rhosts and ~/.shosts files

#IgnoreRhosts yes

To disable tunneled clear text passwords, change to no here!

PasswordAuthentication yes
#PermitEmptyPasswords no

GSSAPI options

GSSAPIAuthentication yes

#AllowAgentForwarding yes
AllowTcpForwarding yes
#GatewayPorts no
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

no default banner path

#Banner none

override default of no subsystems

Subsystem sftp sftp-server.exe

Example of overriding settings on a per-user basis

#Match User anoncvs

AllowTcpForwarding no

PermitTTY no

ForceCommand cvs server

ForceCommand internal-sftp

AllowUsers "na\tanmay.jog"

Match User Lana.Brockway
ChrootDirectory "E:\SFTP Users\Lana.Brockway"

Match User Tanya.Townes
ChrootDirectory "E:\SFTP Users\Tanya.Townes"

Match User Kimberly.Bonebrake
ChrootDirectory "E:\SFTP Users\Kimberly.Bonebrake"

Match User cloudopssftpadmin
ChrootDirectory "E:\Stage\Pub\batch"
ChrootDirectory "E:\Stage\Pub\reports\lbrock"
ChrootDirectory "E:\Stage\Pub\reports\operat"

AllowGroups na.wkglobal.com\gsd-bo-wkadmins

Match Group administrators
AuthorizedKeysFile PROGRAMDATA/ssh/administrators_authorized_keys

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

No source file or test is named in the report. Start with the linked Troubleshooting Steps wiki and the sshd.exe authentication log, then determine the missing information needed to reproduce the domain login failure; done requires a confirmed diagnosis and a documented resolution or actionable project change.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.