[rancid] Re: Netscreen/OpenSSH interaction problem
john heasley
heas at shrubbery.net
Wed May 20 19:20:46 UTC 2009
Wed, May 20, 2009 at 02:23:40PM -0400, Michael W. Lucas:
> On Tue, May 19, 2009 at 02:24:00PM -0700, john heasley wrote:
> > Tue, May 19, 2009 at 02:23:07PM -0700, john heasley:
> > > Tue, May 19, 2009 at 05:12:11PM -0400, Michael W. Lucas:
> > > > On Tue, May 19, 2009 at 01:01:49PM -0700, john heasley wrote:
> > > > > Tue, May 19, 2009 at 03:16:30PM -0400, Michael W. Lucas:
> > > > > > Hi,
> > > > > >
> > > > > > I've found myself inheriting responsibility for a stack of Netscreen
> > > > > > boxes, and of course I want their configurations backed up.
> > > > > >
> > > > > > There's a problem with interactions between newer versions of OpenSSH
> > > > > > and Netscreens, however. To SSH into a Netscreen with newer OpenSSH,
> > > > > > you must add the option "-o ControlMaster=auto" to the SSH command
> > > > > > line.
> > > > > >
> > > > > > Is there any way to pass this option to the Rancid SSH command for my
> > > > > > Netscreen hosts?
> > > > >
> > > > > see sshcmd in cloginrc(5). If I failed to disseminate that change to
> > > > > all of the login scripts, we can fix that.
> > > >
> > > > That was exactly it, thanks!
> > > >
> > > > For anyone following along in the archives: you'll want to use a
> > > > wrapper script much like the following. Trying to escape spaces with
> > > > backslashes, quote marks, etc., doesn't appear to work.
> > > >
> > > > --
> > > > #!/bin/sh
> > > >
> > > > exec ssh -oControlMaster=auto $@
> > > > --
> > >
> > > i'd have expected
> > > add sshcmd * {ssh -o...}
> > >
> > > would have done it
> >
> > Sorry for the extra mail, I should have written:
> >
> > add sshcmd * {ssh\ -o...}
>
> Thanks for the help, your way certainly would be nicer.
>
> I added this to my clogin:
>
> add sshcmd aubvp003 {ssh\ -oControlMaster\=auto}
>
> # clogin aubvp003
> aubvp003
> spawn {ssh\ -oControlMaster\=auto} -c 3des -x -l netscreen aubvp003
>
> Error: {ssh\ -oControlMaster\=auto} failed: couldn't execute "": no such file or directoryerror setting blocking mode: resource temporarily unavailable
> #
>
> Any thoughts? (Not recalling if = needs an escape, I tried both with
> and without.)
try this patch
Index: nlogin.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/nlogin.in,v
retrieving revision 1.51
diff -d -u -d -u -r1.51 nlogin.in
--- nlogin.in 16 Apr 2009 21:22:58 -0000 1.51
+++ nlogin.in 20 May 2009 19:19:05 -0000
@@ -531,7 +531,7 @@
if { "$cmethod" == "" } { set cmethod {{telnet} {ssh}} }
# Figure out the SSH executable name
- set sshcmd [find sshcmd $router]
+ set sshcmd [join [find sshcmd $router] ""]
if { "$sshcmd" == "" } { set sshcmd {ssh} }
# Login to the router
More information about the Rancid-discuss
mailing list