cygsshd fails due to bad ownership or modes of /cygdrive/c/Users

Frank-Ulrich Sommer
Wed Feb 7 21:27:13 GMT 2024

On 07.02.2024 20:27, Corinna Vinschen via Cygwin wrote:
> On Feb  7 20:23, ASSI via Cygwin wrote:
>> Frank-Ulrich Sommer via Cygwin writes:
>>> I'm trying to run cygsshd on my PC with Windows 11 and connect from a
>>> linux machine. I have added the public key to
>>> /cygdrive/c/Users/xxx/.ssh/authorized_keys and created a symbolic link
>>> from  /cygdrive/c/Users/xxx/.ssh to /home/xxx/.ssh. As usual I checked
>>> the access rights and mode of the .ssh directory (700 and belongs to
>>> user xxx) and the authorized_keys file (600 and also belongs to user
>>> xxx) and also of the home directory (had to change ownership).
>> Just bind mount instead of symlinking .ssh and everything should work.
> Assuming you have installed CYgwin under your own account, that's even
> better than utilizing "StrictModes"
> Corinna

Ich decided to move the .ssh directory to /home/username/.ssh and edited nsswitch.conf to specify the home directory with "db_home: /home/%U" (all entries in this file were commented). Now sshd seems to work without deactivating strict mode. If I should still get problems with something else missing the .ssh directory in the WIndows Users directory I will try the bind mount.

I do not know how the .ssh got in /cygdrive/c/Users/... because I did not change anything manually.

Thanks for all the help!

More information about the Cygwin mailing list