Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was able to install and configure openssh on cygwin and is running just right but with one problem: I cannot use private/public key authentication, it just doesnt work.

I followed the same steps as on Linux, adding my key to ~/.ssh/authorized_Keys but it does not pick it up.

Also I checked /var/log/sshd.log but it is empty and has this rights:

-rw-r--r-- 1 cyg_server    None      0 Aug 21 12:53 sshd.log

drwx------+ 1 Administrator None    0 Aug 21 12:57 .ssh

-rw-r--r--  1 Administrator None  395 Aug 21 12:57 authorized_hosts

What am I missing?

share|improve this question

If the file name is acually ~/.ssh/authorized_Keys, then you need to lowercase the K in the filename

If that's not it, try doing ssh -v to the system. That should give you some more information.

share|improve this answer

This could be caused by the HOME environment variable not being set. What is the result of echo $HOME? To which full path does ~/.ssh/authorized_Keys actually resolve?

Also, I believe the filename of the authorized_keys file should be all lowercase.

And last, it seems there are some weird permission issues with cygwin. Try setting permissions to 600 (not 700) for the .ssh directory and its contents. If that doesn't work, I found some old post on the cygwin mailing list where the owner of the .ssh directory and all files inside had to be SYSTEM.SYSTEM for some reason.

If this all doesn't work, check your windows Event Log. I believe that by default, cygwin's sshd logs there instead of in sshd.log (although I don't know why it would create the logfile in that case).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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