Fix Cygwin SSH error: `Ignored authorized keys: bad ownership or modes for directory`

This error always gets me when I change my Cygwin home directory to my Windows home directory and I’m using Cygwin SSH with StrictModes enabled. Then, I have to go digging around the web for the solution. So the error looks like this:

$ ssh -v YOUR_REMOTE_HOST
### some stuff happening ###
debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /cygdrive/c/Users/YOUR_USERNAME

For some reason, Windows makes user directories group-readable and StrictModes doesn’t like that. So you’ll have to do some permission editing:

chown YOUR_USERNAME:None /cygdrive/c/Users/YOUR_USERNAME
chmod 700 /cygdrive/c/Users/YOUR_USERNAME

There. Now you should be able to log in with pubkey authentication. Cheers!