delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/01/23/15:25:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,TW_BN,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Putty and pre-shared keys with Cygwin's sshd
Date: Mon, 23 Jan 2012 12:24:35 -0800
Lines: 121
Message-ID: <jfkfm5$86i$1@dough.gmane.org>
References: <1910391597 DOT 20120121163937 AT mtu-net DOT ru> <jff23g$h5j$1 AT dough DOT gmane DOT org> <1326199340 DOT 20120122003455 AT mtu-net DOT ru> <jffqqg$gke$1 AT dough DOT gmane DOT org> <1838817585 DOT 20120122072825 AT mtu-net DOT ru> <jfgbda$8o9$1 AT dough DOT gmane DOT org> <C78DB4FD-1F9A-4AB3-9BD9-456DDE9F424F AT intersystems DOT com> <jfi9mf$id9$1 AT dough DOT gmane DOT org> <20120123095700 DOT GC2456 AT calimero DOT vinschen DOT de> <jfkaps$2nc$1 AT dough DOT gmane DOT org> <20120123193818 DOT GG2456 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
In-Reply-To: <20120123193818.GG2456@calimero.vinschen.de>
X-Stationery: 0.7.7
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 1/23/2012 11:38 AM, Corinna Vinschen wrote:
> On Jan 23 11:01, Andrew DeFaria wrote:
>> On 1/23/2012 1:57 AM, Corinna Vinschen wrote:
>>>> -----BEGIN DSA PRIVATE KEY-----
>>>> MIIBuwIBAAKBgQDI+RkFLTib52+4+OzI+035r8fIConadaJuXNd+ZRSOvoLJar44
>>>> 1m7jgSnp2A52LJ8LJeC99c7NQ1BBoHueRkgBWReH7orWH2T/vlFrPRgIU48vvgPH
>>>> 4OrLFRtmN/uYj/BTbWFilN2jFZiiESSr4pSOPNNSblqj+UYXfFxc2ZrhIQIVANFm
>>>> lV9qPmupo+/ZQqw1uTRypqve98yI2ZbXTuwIFLAps2T4rQKjmgmfghNWgmUEP0Sm
>>>> V8qEfW8JvSh773fwYgtsAfos/+GPqc7V+UysKT2Na+5sOgqALSX6yfLBi0xAA2Iy
>>>> ToRtrHupAoGAOS7f1yopMnELx7GhAtEtREN1zDikwa8dVhilM1M38+eZH4Z0Wd/3
>>>> H9W2iKKYjgj8lIIYGiXUxjEWhA3n/3N6HDT0O5X97Pp+dM7oHlAaKtGl0Y9ao+Zn
>>>> SmXSquCsokL+1mh1baIe+VcyV2EA7Uat/B0zIlGpwfq4bQv0DmCjl4gCFDBh6pvn
>>>> ckhR34s8s2jaQnkdgv+p
>>>> -----END DSA PRIVATE KEY-----
>>>>
>>>> Whereas all of the lines of my ~/.ssh/authorized_keys files are
>>>> single, loooong lines.
>>> Maybe you *should* read the man pages.  The above is the private part of
>>> the key.  authorized_keys is the file on the server side so it hold only
>>> public keys.
>> You're right. I made a mistake. Corrected it:
> No, you didn't.
OK I'll go with you. I didn't make a mistake! ;-)
> Your mistake is not to read the man pages and apparently you still didn't.
I'm not saying that there isn't another mistake there somewhere. You 
said I used the private part of the key. You were right. I used the 
wrong part. So I changed it to the public part of the key. That's what I 
meant.
>
>> Ltsdo-adefaria:cat /tmp/sshkey_public
>> ---- BEGIN SSH2 PUBLIC KEY ----
>> Comment: "dsa-key-20120121"
>> AAAAB3NzaC1kc3MAAACBAMj5GQUtOJvnb7j47Mj7Tfmvx8gKidp1om5c135lFI6+
>> gslqvjjWbuOBKenYDnYsnwsl4L31zs1DUEGge55GSAFZF4fuitYfZP++UWs9GAhT
>> jy++A8fg6ssVG2Y3+5iP8FNtYWKU3aMVmKIRJKvilI4801JuWqP5Rhd8XFzZmuEh
>> AAAAFQDRZu5keejWsFQn7+ZUlgf5RNrT/QAAAIEAjt/rOWTGhZz7SOnHjsL6lSn4
>> E1aCZQQ/RKZXyoR9bwm9KHvvd/BiC2wB+iz/4Y+pztX5TKwpPY1r7mw6CoAtJfrJ
>> 8sGLTEADYjJOhG2se6kAAACAOS7f1yopMnELx7GhAtEtREN1zDikwa8dVhilM1M3
>> 8+eZH4Z0Wd/3H9W2iKKYjgj8lIIYGiXUxjEWhA3n/3N6HDT0O5X97Pp+dM7oHlAa
>> KtGl0Y9ao+ZnSmXSquCsokL+1mh1baIe+VcyV2EA7Uat/B0zIlGpwfq4bQv0DmCj
>> l4g=
>>
>> Added this to ~/.ssh/authorized_keys. Still fails - same way. Does
>> OpenSSH accept these multiline keys?
> $ man sshd
Could you be a bit more vague! ;-)

Look, the public key that puttygen saves looks like the above. It's 
multilined. That's why I asked "Does OpenSSH accept these multiline 
keys". You could answer that question but instead you give me a cryptic 
reference. From what I read there no it doesn't accept such keys and I 
didn't think it did. Can you see my confusion here?!? Geeze! The man 
page is saying it's gotta be one line but puttygen is giving me multiple 
lines. Hence confusion so I asked a question which you could have simply 
answered directly rather than indirectly.

Yes there's also an area in the puttygen window where it says "copy and 
pastes this for OpenSSH". And I did, several times, and each time it 
failed. So I asked another question. I don't think I'm being 
unreasonable here.
>> I think the problem is that my home directory is on a file server
>> and that file server is not playing nice. By this I mean:
>>
>> Ltsdo-adefaria:touch foo
>> Ltsdo-adefaria:ls -l foo
>> -rw-r--r-- 1 adefaria clearusers 0 Jan 23 10:59 foo
>> Ltsdo-adefaria:chmod 600 foo
>> Ltsdo-adefaria:ls -l foo
>> -rw-r--r-- 1 adefaria clearusers 0 Jan 23 10:59 foo
>> Ltsdo-adefaria:df .
>> Filesystem            1K-blocks   Used Available Use% Mounted on
>> //fs-irva-82/adefaria   5242880 343572   4899308   7% /home/adefaria
> What does `mount' print for this mount point?
//fs-irva-82/adefaria on /home/adefaria type netapp (binary,posix=0,user)

My /etc/fstab entry is:

//fs-irva-82/adefaria           /home/adefaria  smb     
binary,posix=0,user 0 0

>> Ltsdo-adefaria:echo $CYGWIN
>> ntsec smbntsec winsymlinks nodosfilewarning
> You also didn't read the User's Guide for a while...
> http://cygwin.com/cygwin-ug-net/using-cygwinenv.html#cygwinenv-removed-options
What can I say, "old habits die hard". But I'm willing to change them - 
I just didn't know this changed... Thanks for the reference. I will 
change my /etc/fstab to be more correct. Not sure if I can get the mount 
point unbusy right now as I'm busy working but will do so when I can and 
report back. I think this will solve a lot of my problems though.

Managed to remount my home directory. Well that didn't work:

Ltsdo-adefaria:echo $CYGWIN
winsymlinks nodosfilewarning
Ltsdo-adefaria:grep adefaria /etc/fstab
//fs-irva-82/adefaria           /home/adefaria  smb      
binary,posix=0,user,acl 0 0
Ltsdo-adefaria:pwd
/home/adefaria
Ltsdo-adefaria:touch foo
Ltsdo-adefaria:ls -l foo
-rw-r--r-- 1 adefaria clearusers 0 Jan 23 12:21 foo
Ltsdo-adefaria:chmod 600 foo
Ltsdo-adefaria:ls -l foo
-rw-r--r-- 1 adefaria clearusers 0 Jan 23 12:21 foo
Ltsdo-adefaria:mount | grep defaria
//fs-irva-82/adefaria on /home/adefaria type netapp (binary,posix=0,user)
Ltsdo-adefaria:


>> Ltsdo-adefaria:
>>
>> I've run across this before where the remote, often, samba server is
>> not handling permissions like a Windows SMB server would.
> Samba can handle permissions if it's configured to do so.  But I saw
> Samba being configured to behave like FAT a lot.
I think this explains my problems with sharing my Unix home directory 
with Cygwin for a while now.
-- 
Andrew DeFaria <http://defaria.com>
"640K ought to be enough for anybody." - Bill Gates, 1981


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