1

I just updated Cygwin for git on server. And after restarting the sshd service. No accounts can ever logon anymore. Both domain user and local user are not able to logon ssh...

ssh server1 -v gives ... nothing useful.

....
debug1: Offering ECDSA public key: ...
Authentication failed.

eventwvr.msc shows

sshd: PID 1234: fatal: seteuid 19****: No such device or address

But the uid is just fine, verifiable in output of ls -lha -n & ls -lha

Still trying to figure out..

Edit1:

Found similar thread in Cyginwin mail archive, one of the members suggested:

Just switch the account sshd is running under from "cyg_server" to
SYSTEM (or "LocalSystem") and you should be able to logon without the
passwd -R method again.

This is a side effect of changing how Cygwin switches the user
context by default.  See

https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1

HTH,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

Tried switching the server executor from cyg_server to SYSTEM and restart service, but the issue persists for me.

Ben
  • 268
  • 2
  • 11

3 Answers3

0

Hmm, it does not allow me to add comment ( sorry to put in answer section) It did not work for me. If I delete passwd and group file then issue goes away but as soon as I do mkpasswd .... and mkgroup to create file, I get same issue

Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_key_allowed: entering [preauth]
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_request_send: entering, type 22 [preauth]
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_key_allowed: waiting for MONITOR_ANS_KEYALLOWED [preauth]
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_request_receive_expect: entering, type 23 [preauth]
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_request_receive: entering [preauth]
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_request_receive: entering
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: monitor_read: checking request 22
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug3: mm_answer_keyallowed: entering
Feb 18 22:08:42 USL37BCPC2 sshd: PID 1431: debug1: temporarily_use_uid: 4270411484/4266656257 (e=18/18)
Feb 18 22:08:44 USL37BCPC2 sshd: PID 1431: fatal: seteuid 4270411484: No such device or address
Feb 18 22:08:44 USL37BCPC2 sshd: PID 1431: debug1: do_cleanup
Feb 18 22:08:44 USL37BCPC2 sshd: PID 1431: debug1: Killing privsep child 1432

I also followed these steps Should StrictModes be used: yes Do you want to install sshd as a service?: yes Enter the value of CYGWIN for the daemon: (leave empty, just press enter)

My main issue is unable to do ssh from mac to cygwin ssh I get Connection closed by XX.XX.XXX.XX port 22

Sanjay
  • 1
0

I ran into the same problem when updating MSYS2 after quite a long time. I had to do three things to solve it:

  1. Run sshd as the SYSTEM user (change in services -> properties)
  2. Remove /etc/passwd
  3. Remove /etc/group
Marco
  • 1,709
  • 3
  • 17
  • 31
bjoern
  • 1
  • 1
0

Run the interactive program ssh-host-config and answer following questions:

Should StrictModes be used: yes
Do you want to install sshd as a service?: yes
Enter the value of CYGWIN for the daemon: (leave empty, just press enter)

kenlukas
  • 3,101
  • 2
  • 16
  • 26