DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4BILMBbb615804
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4BILMBbb615804
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=I/lRz0Pa
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01B1F3858402
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1734556930;
	bh=VJgfo5IMGuxeXCUrTpxXFKXGvy8STz9TWiT9XfFcBw8=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=I/lRz0PaVU7KTXImcr0I1S7bHXMkEWLo9gehtfNOw6h9GnnMn5ky/m3PEihp+bsYC
	 DVHMdrylRY5VLe73zEmfFjOSmVzynaiiNraYRmtzo6NXnzQgZYWgEWcQlPCDLDefZF
	 jFYhxinVohHpF8OJwihKxfeUkW4An2eYDIQ8nkpw=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F21C3858D3C
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1F21C3858D3C
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734556811; cv=none;
 b=b14tEaCV2tPXtIZRahfFMkdH5chrxuiBfi7MIlw8eEs3wv60wkUSEP+wIzmrP0lBEL5hgY9O7TcPBL+BYIHhc1/4Ld/smYFhooEg47/q1XFDVHQK4x/nSrSxCQOZmvKD0BR+F20aeJ+XCoDEoHTH211dn4zR2iEc2UE0IfQHZBo=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1734556811; c=relaxed/simple;
 bh=bDtQX51vt0Ep9er+7mSA/539rLzBClL0uzJJYFmD3aE=;
 h=Message-ID:Date:MIME-Version:Subject:To:From;
 b=ADh6gEX+06eKTv3Mciu2gpwAb7pJCbNXDAuFAqx9bUNx1w5huYK6WPzIG6H4N/ZPnhfSuGOsmMnpIhvm/qMdFM8FRRaVAXvzLK8tss/nODPxCN4Z6+WqUWAWS+ghqrYPS0AF54AwyTcHov+I4NyDNVrZ8i2gDhG1lQrqrRBrSvk=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F21C3858D3C
Message-ID: <a748caa6-94d1-46c5-a280-873357ee07f0@huarp.harvard.edu>
Date: Wed, 18 Dec 2024 16:20:09 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: cygport upload seems to ignore SSH_KEY
To: Federico Kircheis <federico@kircheis.it>, cygwin@cygwin.com
References: <8d85bde3-8ea8-4635-8547-9846315243cf@kircheis.it>
 <7704ca4f-00ba-41b8-897c-7558d846ec18@SystematicSW.ab.ca>
 <nlvjij9vha7u1j71seri65tfg21o7ua3im@4ax.com>
 <1fe1c4ea-83bd-4fe8-9daf-496ff6ec2c69@SystematicSW.ab.ca>
 <6d211145-71a2-47d5-83ac-e7a3330e30ce@kircheis.it>
 <87ses58u8k.fsf@Gerda.invalid>
 <06f56012-2124-4df1-bc4f-5fb695524872@kircheis.it>
 <a1fc3f55-571c-4a1a-9e83-ae1848f03191@kircheis.it>
 <50cd7675-6af4-cb84-4cc4-dd0d91956d26@cs.umass.edu>
 <27824a22-d87b-4502-ae87-765ff0ba1bae@kircheis.it>
Content-Language: en-US
In-Reply-To: <27824a22-d87b-4502-ae87-765ff0ba1bae@kircheis.it>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Norton Allen via Cygwin <cygwin@cygwin.com>
Reply-To: Norton Allen <allen@huarp.harvard.edu>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 4BILMBbb615804

On 12/18/2024 3:37 PM, Federico Kircheis via Cygwin wrote:
> On 18/12/2024 20.38, Eliot Moss wrote:
>> On 12/18/2024 2:30 PM, Federico Kircheis via Cygwin wrote:
>>> On 05/11/2024 18.31, Federico Kircheis wrote:
>>>> On 05/11/2024 18.29, ASSI via Cygwin wrote:
>>>>> Federico Kircheis via Cygwin writes:
>>>>>> I also did a chmod/chown on the file to ensure that the permission
>>>>>> where correct.
>>>>>> The file with the permission unchanged worked without issues when
>>>>>> moved in ~/.ssh.
>>>>>
>>>>> Whatever directory that file resides in must be readable only by the
>>>>> owner or SSH will not use it.
>>>>>
>>>>>
>>>>> Regard,
>>>>> Achim.
>>>>
>>>> Mhm, that could be it.
>>>> I did not try to modify the permission of the directory.
>>>
>>>
>>> Nope.
>>>
>>> Directory has permission 0700, file has permission 0600, just to be 
>>> sure I've execute chmod on both.
>>> I can access they key but I still experienced the issue
>>>
>>> ~~~~
>>> $ ls -la $SSH_KEY
>>> -rw-------+ 1 Administrators None 3357 Dec 20  2019 /cygdrive/c/ 
>>> cygport-ps/ssh/id_rsa_cyg
>>>
>>> $ ls -la /cygdrive/c/cygport-ps/ssh/
>>> total 13
>>> drws--S---+ 1 Administrators None    0 Jan 14  2023 .
>>> drwxrwx---+ 1 Administrators None    0 Dec 18 10:55 ..
>>> -rw-------+ 1 Administrators None 3357 Dec 20  2019 id_rsa_cyg
>>> -rw-------+ 1 Administrators None  745 Jul 25  2018 id_rsa_cyg.pub
>>> -rw-------+ 1 Administrators None  236 Mar 18  2020 known_hosts
>>> ~~~~
>>>
>>> If I manually execute lftp
>>>
>>>
>>> ~~~~
>>> $ lftp sftp://cygwin:@cygwin.com
>>> lftp cygwin@cygwin.com:~> cd .
>>> cd `.' [Connecting...]
>>> ~~~~
>>>
>>> and hangs.
>>>
>>> I'm not sure how to debug the issue further, and the relation 
>>> between all tools.
>>>
>>> ~~~~
>>> $ sftp sftp://cygwin:@cygwin.com
>>> cygwin:@cygwin.com: Permission denied (publickey).
>>> Connection closed
>>> ~~~~
>>>
>>> I guess lftp/sftp does not support the variable SSH_KEY, as I get 
>>> the same "Permission denied (publickey)." error with "ssh -v sftp:// 
>>> cygwin:@cygwin.com", and I see that there is no attempt to use my 
>>> ssh key
>>>
>>> Also following command does not report an error:
>>>
>>> ~~~~
>>> sftp -i $SSH_KEY sftp://cygwin:@cygwin.com
>>> Connection closed by 8.43.85.97 port 22
>>> Connection closed
>>> ~~~~
>>
>> Curious.  I'm not an expert, but I tend to put info in my ssh config 
>> file.  Does that help here?
>>
>> And, probably grasping at straws, are you sure SSH_KEY is exported :-) ?
>>
>> Some people who are more expert might have better suggestions ... 
>> Eliot Moss
>>
>
> Yes, I'm sure it is exported, and currently even copying the file in 
> .ssh does not work, which did work last time (I get the exact same 
> behavior), thus ATM I'm unable to push an update.
>
> Maybe an issue server-side?
>
As far as I know, neither sftp nor ssh support the environment variable 
SSH_KEY, but if you are passing it on the command line as below, it 
doesn't need to.

Have you tried adding the '-v' option to report verbose status? That 
will let you know if it is trying to use the specified key.



-- 
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

