cygsshd fails due to bad ownership or modes of /cygdrive/c/Users
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Feb 7 19:55:15 GMT 2024
On Feb 7 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"
Scratch the "Assuming you have installed Cygwin under your own account"
thingy. The safe_path() function in OpenSSH checks the path of files
in your home dir only up to the home directory itself. However, that
depends on
$ getent passwd <your-account-name>
returning the correct home dir.
Personally I just use Cygwin's /home/corinna as home path and symlink
or bind mount the Windows stuff into it, e.g.
$ ln -s /proc/cygdrive/c/Users/corinna ~/winhome
Corinna
More information about the Cygwin
mailing list