Re: [PATCH] Input wanted on changes.

Bj|rn Augustsson <[email protected]>
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
On Mon, Jan 24, 2005 at 05:20:24PM +0000, Toby Dickenson wrote:
> 
> Ahh, yes. There is a detail I forgot to mention. (Im not using this technique 
> in production, so there may be other gaps too. please do keep prodding)

:-)

> There are various other ways to choose your private key. Last time I needed 
> this, I used ~/.ssh/config on the secondary. From "man ssh_config":
> 
>      HostName
>              Specifies the real host name to log into.  This can be used
>              to specify nicknames or abbreviations for hosts.  Default is 
>              the name given on the command line.  Numeric IP addresses
>              are also permitted (both on the command line and in
>              HostName specifications).
> 
> That is, your replica.py command line contains a host nickname, and 
> ~/.ssh/config maps that on to the real hostname and identity file.
 
Well, I'd call that as bad a hack as the previous ones, in fact the 
original one which looks for the libs in the directory below the script 
itself tastes a lot better now. (Perhaps with a conditional that looks 
if ZODB really is there, and only adds it in that case.) 

Kind of like having a runpath in binaries insted of fiddling with 
LD_LIBRARY_PATH. *shrug*

> Thinking aloud: You may also be able to leverage the ssh -A switch to pass 
> authentication information from the master.
> 
> 
> Waaah - all of those solutions are nasty..

Heh.
 
> rsync has a -e switch that lets you replace ssh, or include extra parameters 
> to ssh. How about this attached (untested) patch that adds the same thing to 
> replica.py? You could use -e "ssh -i identityfile"

Can't do '-e "ssh -i identityfile"', got to be 
'-e "/usr/bin/ssh -i identityfile"' (absolute path), but other than 
that, yeah. I got this to work.

I like it. This also lets you add that "-x" in there, if you feel like it.
(And whatever other ssh options you might like/need. Or if it's 
 installed somewhere else than /usr/bin, perhaps. )

> Please let me know if this works and I will include it in the next release.

Thumbs up from me.

/August.
-- 
Bj|rn Augustsson      Sysadmin     IT Systems & Services
Chalmers tekniska h|gskola     Chalmers University of Technology
         "Damn spooky analog crap." -- John Carmack.


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.