I have a laptop with windows 8. I'm trying to setup SSH from this laptop to a windows 2012 server via Cygwin64.

I followed the steps as described here.

However, when I am at the step: ssh-user-config, I get the error:

ERROR: There is no home directory set for you in /etc/passwd.<br>
ERROR: Setting $HOME is not sufficient!

In my Cygwin64 installation folder, I see a directory home with a user that is copied from the windows user I'm logged in with (say this user is nifty).

I also see a file cygwin64/etc/passwd - but in the file my windows user (nifty) is not present.

The only line I see there is:


I have tried to manually add the passwd file, inserting:


I also tried to add:


When googling, the only thing I come up with is try to run this command:

mkpasswd -l -u >> /etc/passwd

I noticed this adds some accounts present in windows (such as the administrators group, system account and the created cyg_server from the step above), but it doesn't help me in letting me execute ssh-user-config.

Can somebody explain me how to proceed?

  • Is your account a local account or a domain account? If the latter, try mkpasswd -d. mkpasswd -c looks interesting too.
    – Mikel
    Feb 15, 2015 at 16:14
  • Is your username nifty or swuyts or something else? They don't match in your question. i.e. why did you mention /home/swuyts?
    – Mikel
    Feb 15, 2015 at 16:15
  • @Mikel: mkpasswd -c did the job. Thank you for that! Feb 15, 2015 at 16:34

2 Answers 2


This is a temporary problem. The ssh-user-config script needs a fix.

The reason your "How To Geek" tutorial doesn't match your experience is that the most recent release of Cygwin (1.7.34) did away with /etc/passwd and /etc/group in the default installation. It is possible to recreate them, as you eventually discovered, but if they aren't present, the Cygwin DLL uses the Windows native user/group databases: AD if present, or SAM if not.

This script is making an outdated assumption, being that it can just run the contents of /etc/passwd through awk to answer questions.

Cygwin recently got a new getent(1) program which works like the one on Linux, abstracting away the differences between the /etc files, AD, and SAM. The script just needs patches to use this tool instead of parsing /etc files.

As we say on the Cygwin mailing lists, PTC!


Please try re-running the setup.exe to update to the openssh-6.7p1-2. This should fix your issue.

Also, the origin of the issue (setup.exe choosing "prev" version for first install of a package instead of current one) has been resolved.

  • Are you sure that's all that's needed? I thought we were still waiting on an update to csih from Corinna. Feb 19, 2015 at 4:13
  • Yes, Warren. I checked this. And this was my bugreport, amongst other, that helped to nail and resolve the issue :)
    – AnrDaemon
    Feb 23, 2015 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .