Discussion:
[rancid] Netscreen/OpenSSH interaction problem
Michael W. Lucas
2009-05-19 19:16:30 UTC
Permalink
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?

Thanks,
==ml
--
Michael W. Lucas ***@BlackHelicopters.org, ***@FreeBSD.org
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
john heasley
2009-05-19 20:01:49 UTC
Permalink
Post by 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.
Post by Michael W. Lucas
Thanks,
==ml
--
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Michael W. Lucas
2009-05-19 21:12:11 UTC
Permalink
Post by john heasley
Post by 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 $@
--
Post by john heasley
Post by Michael W. Lucas
Thanks,
==ml
--
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
--
Michael W. Lucas ***@BlackHelicopters.org, ***@FreeBSD.org
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
john heasley
2009-05-19 21:23:07 UTC
Permalink
Post by Michael W. Lucas
Post by john heasley
Post by 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
--
i'd have expected
add sshcmd * {ssh -o...}

would have done it
john heasley
2009-05-19 21:24:00 UTC
Permalink
Post by john heasley
Post by Michael W. Lucas
Post by john heasley
Post by 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
--
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...}
Michael W. Lucas
2009-05-20 18:23:40 UTC
Permalink
Post by john heasley
Post by john heasley
Post by Michael W. Lucas
Post by john heasley
Post by 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
--
i'd have expected
add sshcmd * {ssh -o...}
would have done it
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.)

Thanks,
==ml
--
Michael W. Lucas ***@BlackHelicopters.org, ***@FreeBSD.org
http://www.BlackHelicopters.org/~mwlucas/
Latest book: Cisco Routers for the Desperate, 2nd Edition
http://www.CiscoRoutersForTheDesperate.com/
john heasley
2009-05-20 19:20:46 UTC
Permalink
Post by Michael W. Lucas
Post by john heasley
Post by john heasley
Post by Michael W. Lucas
Post by john heasley
Post by 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
--
i'd have expected
add sshcmd * {ssh -o...}
would have done it
add sshcmd * {ssh\ -o...}
Thanks for the help, your way certainly would be nicer.
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

Loading...