summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* patch for "out of band" access to devicesusercmdEd Ravin2008-02-131-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Fri, May 12, 2006 at 10:47:49PM -0400, Ed Ravin wrote: > On Tue, Aug 16, 2005 at 03:56:04PM +1000, Andrew Pollock wrote: > ... > > So the only way of managing the devices is via SSHing to the Cyclades and > > getting on the console port. We can SSH directly to a specific port of the > > Cyclades, and after authenticating, get on the console attached to that > > port, and disconnect by way of the standard SSH disconnect break sequence > > when we're done. > > > > I'm wondering if RANCID has evolved over the last nearly 2 years to include > > such out of band access to devices, or if it's much of a muchness still? As I posted previously, I've implemented this, and I now think/hope it's clean enough to release a patch. Here's how it works in cloginrc: add method testrouter {usercmd} add usercmd testrouter {ssh} {-t} {termserver01} {cu -l /dev/tty01 -s 9600} add usercmd_chat testrouter {Connected.} {\r} The patches below to clogin define a new method, "usercmd" (i.e. instead of "telnet" or "ssh"), which tells clogin to use the exact text supplied in the "usercmd" directive for that router as the command to spawn. Note the way the command line args are delimited, the braces have to be used to mark off the arguments or the spawn command will fail. Since whatever out-of-band gizmo you're using to access the router might need some more interaction to let you get to the router, the usercmd_chat directive is a list of expect/send pairs - match something, send something, match the next something, send something, etc. This is pretty primitive but it should be enough to get through conserver, cu, kermit, or whatever you're using as the out-of-band connector. In the above case, usercmd_chat is defined to "wait for the string 'Connected.' and then send a CR". For Andrew's case above, he might have to do something like: add usercmd routeronc1 {ssh} {-t} {-p 12345} {cyclades01} add usercmd_chat routeronc1 {Login:} {operator\r} {Password:} {secret\r} {Connected.} {\r} to get past the authentication he describes, and then send a CR to the router to get it to display a prompt. I didn't code anything yet for the situation Andrew describes where he wants to send an SSH break sequence when he's done. The attached patch includes a fix to clogin so that it will hang up if it times out after it's already sent "exit" to the router - though it wastes a few more seconds timing out, it is a reliable way to close the connection in my environment. If it turns out someone needs to have more chat interaction upon exit, I'd be happy to code it in. The patch to clogin is attached. The first chunk may need to be applied by hand, since one of the surrounding lines is from my S/Key patches. -- Ed
* Imported from rancid-2.3.2a8.tar.gz.HEADrancid-2.3.2a8masterunknown2008-02-1386-2140/+4666
|
* Imported from rancid-2.3.2a7.tar.gz.rancid-2.3.2a7Tar Committer2007-01-1423-710/+785
|
* Imported from rancid-2.3.2a6.tar.gz.rancid-2.3.2a6Tar Committer2006-12-0577-3355/+5547
|
* Imported from rancid-2.3.2a5.tar.gz.rancid-2.3.2a5Tar Committer2006-08-1250-298/+318
|
* Imported from rancid-2.3.2a4.tar.gz.rancid-2.3.2a4Tar Committer2006-05-0450-627/+1813
|
* Imported from rancid-2.3.2a3.tar.gz.rancid-2.3.2a3Tar Committer2005-08-1526-111/+468
|
* Imported from rancid-2.3.2a2.tar.gz.rancid-2.3.2a2Tar Committer2005-07-0763-1853/+2253
|
* Imported from rancid-2.3.2a.tar.gz.rancid-2.3.2aTar Committer2005-03-3025-632/+473
|
* Imported from rancid-2.3.1.tar.gz.rancid-2.3.1Tar Committer2004-06-0628-299/+503
|
* Imported from rancid-2.3.tar.gz.rancid-2.3Tar Committer2004-03-1446-459/+738
|
* Imported from rancid-2.3.rc1.tar.gz.rancid-2.3.rc1Tar Committer2004-01-12125-7161/+21151
|
* Imported from rancid-2.2.2.tar.gz.rancid-2.2.2Tar Committer2002-08-0930-291/+817
|
* Imported from rancid-2.2.1.tar.gz.rancid-2.2.1Tar Committer2002-05-0232-140/+1547
|
* Imported from rancid-2.2.tar.gz.rancid-2.2Tar Committer2002-01-0466-2127/+5024
|
* Imported from rancid-2.2b8.tar.gz.rancid-2.2b8Tar Committer2001-10-1623-96/+1628
|
* Imported from rancid-2.2b7.tar.gz.rancid-2.2b7Tar Committer2001-08-156-10/+22
|
* Imported from rancid-2.2b6.tar.gz.rancid-2.2b6Tar Committer2001-08-1015-14/+884
|
* Imported from rancid-2.2b5.tar.gz.rancid-2.2b5Tar Committer2001-08-0348-444/+1860
|
* Imported from rancid-2.2b.tar.gz.rancid-2.2bTar Committer2001-04-0931-128/+1012
|
* Imported from rancid-2.1.tar.gz.rancid-2.1Tar Committer2001-02-0548-557/+2353
|
* Imported from rancid-2.1b.tar.gz.rancid-2.1bTar Committer2000-11-2428-399/+2547
|
* Imported from rancid-2.0.tar.gz.rancid-2.0Tar Committer2000-11-1937-400/+5957
|
* Imported from rancid-1.6.tar.gz.rancid-1.6Tar Committer2000-09-2010-64/+951
|
* Imported from rancid-1.5.tar.gz.rancid-1.5Tar Committer2000-08-2318-178/+1738
|
* Imported from rancid-1.4.tar.gz.rancid-1.4Tar Committer2000-02-0317-814/+2398
|
* Imported from rancid-1.2.tar.gz.rancid-1.2Tar Committer1999-08-105-481/+35
|
* Imported from rancid-1.1.tar.gz.rancid-1.1Tar Committer1999-07-032-7/+479
|
* Imported from rancid-1.0.tar.gz.rancid-1.0Tar Committer1999-06-2016-0/+2811