Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.