Problem using a public key when connecting to a SSH server running on Cygwin
A colleague encountered that issue last week and he eventually tracked it down to the primary group in /etc/passwd needing to be local admin.
Make sure that the access rights for your ~/.ssh/
and underlying files is 700 or less. Otherwise ssh will ignore your authorized keys.
I have three accounts on one machine (Mac OSX) and I setup all of their .ssh/authorized_keys files to contain the id_rsa.pub of the other two. But I could not "ssh" into one of these accounts from either of the other two, yet they could "ssh" to each other.
The answer came from a blog entitled Debugging SSH public key authentication problems
. My "bad" account had group and public "write" permissions on its home directory. All I had to do was
chmod 755 /Users/yourname
where yourname is the bad account, and you are logged into that account, or using "sudo" (root) privileges. Check it out. It worked for me.