delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/14/17:27:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_YG
X-Spam-Check-By: sourceware.org
Message-ID: <4DCEF3A6.4040907@ls83.eclipse.co.uk>
Date: Sat, 14 May 2011 22:27:02 +0100
From: Tim Allen <tda AT ls83 DOT eclipse DOT co DOT uk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: ssh - Could not create directory 'c/.ssh'.
References: <4DCA6895 DOT 6010702 AT ls83 DOT eclipse DOT co DOT uk> <4DCAA119 DOT 9040909 AT cygwin DOT com> <4DCAF9CF DOT 3080600 AT ls83 DOT eclipse DOT co DOT uk> <4DCB3078 DOT 6070708 AT cygwin DOT com> <4DCC4950 DOT 3090307 AT ls83 DOT eclipse DOT co DOT uk> <4DCD660D DOT 6030706 AT cygwin DOT com>
In-Reply-To: <4DCD660D.6030706@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 13/05/11 18:10, Larry Hall (Cygwin) wrote:
> On 5/12/2011 4:55 PM, Tim Allen wrote:
>> On 12/05/11 01:57, Larry Hall (Cygwin) wrote:
>>> On 5/11/2011 5:04 PM, Tim Allen wrote:
>>>> Hi Larry
>>>>
>>>> On 11/05/11 15:45, Larry Hall (Cygwin) wrote:
>>>>> On 5/11/2011 6:44 AM, Tim Allen wrote:
>>>>>> Hi
>>>>>>
>>>>>> I have happily used Cygwin ssh from "DOS" command prompt for many
>>>>>> years but
>>>>>> on upgrading to V1.7 get this error message. Further info:
>>>>>>
>>>>>> OS: Vista
>>>>>>
>>>>>> /etc/passwd line:
>>>>>> tda:unused_by_nt/2000/xp:1000:513:U-laptop1\tda,S-1-5-21-2414507100-3802266639-3593817948-1000:/home/tda:/bin/bash
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> The interesting thing is that if I open up a second command prompt
>>>>>> and
>>>>>> run an
>>>>>> arbitrary cygwin command (like "less filename"). ssh successfully
>>>>>> finds
>>>>>> /home/tda/.ssh (but only for so long as that second command is
>>>>>> running).
>>>>>>
>>>>>> I suspect this is something to do with the changes to mounts, but so
>>>>>> far I've
>>>>>> been unable to find a fix.
>>>>>
>>>>> I think we need more information about what you're actually doing and
>>>>> what
>>>>> your configuration is. Please review the problem reporting guidelines
>>>>> found
>>>>> here:
>>>>>
>>>>>> Problem reports: http://cygwin.com/problems.html
>>>>>
>>>>
>>>> OK. Steps to reproduce:
>>>>
>>>> 1. Open command prompt, type:
>>>> c:\ ssh fleet
>>>> Could not create directory 'c/.ssh'.
>>>> The authenticity of host 'fleet (192.168.1.30)' can't be established.
>>>> RSA key fingerprint is 17:33:a7:32:cd:e1:04:ed:d7:3b:dc:11:c6:da:3c:42.
>>>> Are you sure you want to continue connecting (yes/no)?
>>>>
>>>> 2. Open second command prompt, type:
>>>> c:\ less main.c
>>>>
>>>> 3. Leave less running, return to first prompt and repeat login attempt:
>>>> c:\ ssh fleet
>>>> Linux fleet 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686
>>>> (login OK)
>>>>
>>>>
>>>> cygcheck.out is output of cygcheck -s -v -r with less NOT running.
>>>> cygcheck1.out is output of cygcheck -s -v -r with less running.
>>>>
>>>> The difference below looks relevant:
>>>>
>>>> cygcheck.out:
>>>> Output from c:\cygwin\bin\id.exe
>>>> UID: 0(tda) GID: 0(root)
>>>> 0(root) 545(Users)
>>>
>>> Indeed. Some thoughts:
>>>
>>> 1. Check that you're using Cygwin's ssh.
>>
>> Yes, double checked.
>>
>>> 2. Try unsetting "HOME" before running ssh.
>> C:\>set HOME=
>> C:\>ssh -v fleet
>> OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
>> debug1: Connecting to fleet [192.168.1.30] port 22.
>> debug1: Connection established.
>> debug1: permanently_set_uid: 0/0
>> debug1: identity file /.ssh/id_rsa type -1
>> ...
>> ssh goes on to create /.ssh off of c:\cygwin and fails since no id_rsa
>> files.
>>
>> Copying .ssh/ into c:\cygwin results in this working.
>>
>> Try:
>>
>> c:\>set HOME=/home/tda
>> c:\>ssh -v fleet
>> OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
>> debug1: Connecting to fleet [192.168.1.30] port 22.
>> debug1: Connection established.
>> debug1: permanently_set_uid: 0/0
>> debug1: identity file /home/tda/.ssh/id_rsa type 1
>> ...
>> (succeeds, but I need HOME to be "correct" for other apps)
>>
>> Try returning to Windows default:
>>
>> c:\>set HOME=c:\Users\tda.DCA
>> c:\>ssh -v fleet
>> OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
>> debug1: Connecting to fleet [192.168.1.30] port 22.
>> debug1: Connection established.
>> debug1: permanently_set_uid: 0/0
>> Could not create directory 'c/.ssh'.
>> debug1: identity file c/.ssh/id_rsa type -1
>
> Sorry, I cannot reproduce this, even with all my Cygwin processes stopped
> prior to running this:
>
> C:\>set HOME=c:\users\lhall
>
> C:\>ssh -v ds9
> OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
> debug1: Reading configuration data /etc/ssh_config
> debug1: Connecting to ds9 [192.168.1.190] port 22.
> debug1: Connection established.
> debug1: identity file /home/lhall/.ssh/id_rsa type 1
> ...
> (succeeds)
>
> But looking back at your '/etc/passwd' entry, you have:
>
> tda:unused_by_nt/2000/xp:1000:513:U-laptop1\tda,S-1-5-21-2414507100-3802266639-3593817948-1000:/home/tda:/bin/bash
>
>
> When I compare that to the home directory you want (HOME=c:\Users\tda.DCA),
> I'm wondering if you have a mismatch of usernames. What does 'id' tell
> you your user is?
>

With no other Cygwin processes:
C:\>id
uid=0(tda) gid=0(root) groups=0(root),545(Users)

With the Cygwin bash prompt in another window:
C:\>id
uid=1000(tda) gid=513(None) groups=513(None),545(Users)

I keep coming back to thinking this is the root cause of the problem, 
but the question is why.

> Also, I note that our debug output for 'ssh -v' differs. You may want to
> investigate that some too.
>
> Other stray ideas which may or may not be relevant:
> BLODA
> Downgrade OpenSSH
>
Just downgrading OpenSSH doesn't help, but bringing in the old dll's too 
fixes the problem (as expected, since this broke after the upgrade). 
Can't check precise version at the moment, but it's 2008 vintage.



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

- Raw text -


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