delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/02/07/14:56:13

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF1A138582A4
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1707335770;
bh=j39DUuW7d0nuqcwQXcYlvpuFG9tBKmOWOQ8gaX1LqiM=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=t7bh2xasKjuTIQvZRM36tG57yvLSH7D9NPVW8iqr+npCSqyBfqeMY4Ko56AXaKTk2
EbTiCWFvS4/lCbxVFBUhYua+y1gI8g+g7wlyjr/Mo775DedUdrLKGSFMqsjxFHUNTu
dYbUVqUbhyJpOa50r6ICQb5hACWs6+tm7vDEv1f4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CA6E3858C53
Date: Wed, 7 Feb 2024 20:55:15 +0100
To: cygwin AT cygwin DOT com
Subject: Re: cygsshd fails due to bad ownership or modes of /cygdrive/c/Users
Message-ID: <ZcPgI_teQ09GqawP@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <a2df2105-31b8-425c-a963-4ea98e2f2ffa AT f-us DOT de>
<87eddodqox DOT fsf AT Gerda DOT invalid>
<ZcPZkcrwpZ78mR9v AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <ZcPZkcrwpZ78mR9v@calimero.vinschen.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 417JuD5T019684

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

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019