delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/11/29/15:15:27

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Passwordless authentication between two domains.
Date: Thu, 29 Nov 2012 12:14:28 -0800
Lines: 65
Message-ID: <k98fn3$qc7$1@ger.gmane.org>
References: <1353433612060-94427 DOT post AT n5 DOT nabble DOT com> <k8ghdb$kps$1 AT ger DOT gmane DOT org> <1354127875 DOT 88050 DOT YahooMailNeo AT web122106 DOT mail DOT ne1 DOT yahoo DOT com> <20121128200904 DOT M70718 AT ds DOT net> <1354134069143-94590 DOT post AT n5 DOT nabble DOT com> <k95si1$5a7$1 AT ger DOT gmane DOT org> <1354136009 DOT 21649 DOT YahooMailNeo AT web122105 DOT mail DOT ne1 DOT yahoo DOT com> <k95ujm$o61$1 AT ger DOT gmane DOT org> <1354137687 DOT 39813 DOT YahooMailNeo AT web122104 DOT mail DOT ne1 DOT yahoo DOT com> <k968hu$fll$1 AT ger DOT gmane DOT org> <20121129112808 DOT GE67410 AT justpickone DOT org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
In-Reply-To: <20121129112808.GE67410@justpickone.org>
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 11/29/2012 3:28 AM, David T-G wrote:
> Andrew, et al --
>
> ...and then Andrew DeFaria said...
> %
> % On 11/28/2012 1:21 PM, anulav2 wrote:
> % >Andrew,
> % >Keys will "ALWAYS" be different irrespective if it is two servers on same
> % >or different domain.
> % >That is the whole point of copying keys to remote servers authorized_keys
> % >file.
> % I don't think so. I do know the following - here at my current client
> % there are two distinct domains that I deal with - Irvine and San Jose.
> % My Windows laptop is in the Irvine domain. My home directory is on a
> % filer and is shared between my Windows laptop and the various Linux
> % server machines in Irvine. I generate a key and put it in my
> % ~/.ssh/authorized_keys and I can ssh to localhost or any of the Linux
> % servers. Additionally I can ssh from Linux to my laptop, passwordlessly.
>
> That makes sense; all of the machines in Irvine (including your laptop)
> are using the same id_dsa & id_dsa.pub & authorized_keys (or perhaps
> authorized_keys2 but we'll ignore that for the moment) files.
>
>
> %
> ...
> % However if I generate a key in San Jose and put it in
> % ~/.ssh/authorize_keys in Irvine then I can ssh from San Jose -> Irvine
> % without a password. This tells me that generated ssh keys are unique per
> % domain. For bilateral ssh passwordless logins between the two domains
> % you should have at least 2 lines in your ~/.ssh/authorized_keys file,
> % one for each domain:
> [snip]
>
> Incorrect.  ssh doesn't care a bit what domain (if at all) or even what
> OS you're using or where the key was generated.  This simply tells you
> that the shared home directory in San Jose is not the same as the one in
> Irvine.  If it were the same, then the very same id_dsa & id_dsa.pub &
> authorized_keys files would work the very same way; since it is different
> storage, however, you don't have the id_dsa key to match which would
> allow San Jose -> Irvine access.
>
> Try this in both Irvine & San Jose:
>
>    cd ~/.ssh
>    ls -ligo id_dsa* authorized_keys*
>
> I predict that you will find the inodes to be the same all over Irvine
> and the same all over San Jose *but* different between the two locations.
> You may find df or mount to be illustrative as well.
Oh I know I don't have the same home directory on both domains, in fact 
I stated that.

I think the part that was confusing me was that I didn't copy both the 
~/.ssh/id_dsa.pub and the ~/.ssh/id_dsa as a pair.

Thanks for the clarification and simplification.

So the op's problem is still a mystery...
-- 
Andrew DeFaria <http://defaria.com>
Is God willing to prevent evil, but not able? Then he is not omnipotent. 
Is he able, but not willing? then he is malevolent. Is he both able and 
willing? Then whence cometh evil? Is he neither able nor willing? Then 
why call him God?


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