I know very little of Windows yet I have to work with a Windows server. The only way to make this bearable is with Cygwin and sshd. I have installed and configured sshd but I don't really understand how it's doing authentication. And I also don't manage to log in, even though it's definitely running on port 22.

I have successfully used cygwin+ssh in the past (without much understanding of authentication). Both of those times I managed to get it working with local users. This time there's an entire LDAP-ish system as well (not sure what it's called in Windows).

There's an /etc/passwd file which is I generated with mkpasswd. Is there a simple way to add a user there that I can log in with?

There is talk about the CYGWIN environment variable, supposed to be set in C:\cygwin\Cygwin.bat, but I'm not sure how it affects things:

set CYGWIN=binmode tty ntsec

How does the OpenSSH server authenticate under Windows/Cygwin? How can I add one basic local user to use over SSH? How can I add one local user with administrator rights to use over SSH?


sshd is using the same users as Windows. The now optional /etc/passwd is used for storing the alternate cygwin name of the window user (same SSID) or to specify the HOME directory or the preferred shell.

The authentification method for the user is defined in its own ~/.ssh/config file same as on other Unix systems. Use


to configure server and user. Please note that all these settings are now obsolete.

set CYGWIN=binmode tty ntsec

Read https://cygwin.com/docs.html for updated info.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.