public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygsshd fails due to bad ownership or modes of /cygdrive/c/Users
Date: Wed, 7 Feb 2024 20:55:15 +0100	[thread overview]
Message-ID: <ZcPgI_teQ09GqawP@calimero.vinschen.de> (raw)
In-Reply-To: <ZcPZkcrwpZ78mR9v@calimero.vinschen.de>

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

  reply	other threads:[~2024-02-07 19:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 23:53 Frank-Ulrich Sommer
2024-02-06  1:28 ` Frank-Ulrich Sommer
2024-02-06  1:36   ` Eliot Moss
2024-02-06 21:22     ` Brian Inglis
2024-02-07  2:26       ` Frank-Ulrich Sommer
2024-02-07  5:34         ` marco atzeri
2024-02-07 19:01         ` matthew patton
2024-02-07 19:25           ` Corinna Vinschen
2024-02-07 19:23 ` ASSI
2024-02-07 19:27   ` Corinna Vinschen
2024-02-07 19:55     ` Corinna Vinschen [this message]
2024-02-07 21:27     ` Frank-Ulrich Sommer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZcPgI_teQ09GqawP@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).