[plug] multiple commands in a single ssh connection

Daniel Pittman daniel at rimspace.net
Fri Oct 10 12:54:54 WST 2008


"Adam Hewitt" <ahewitt at theozhewitts.com> writes:

> I have tried most of what has been suggested already which leads me to
> believe that its something to do with the remote host....which I
> should have specified as being Cisco switches.

Well, that /is/ useful information: the interpretation of the command
sent is up to the "default shell" on the server side, which means that
whatever Cisco provide as the CLI is what you get.

For that, Except or some other tool able to issue commands and wait for
the response is likely good, except ...

> Basically I have a bunch of large modifications to do to the network I
> am working on which require a lot of planning (read: auditing) and I
> don't want to be chasing down mac addresses and such one at a time
> automatically. I also want to be able to push config changes to the
> switches in bulk which requires a series of commands in a single ssh
> session.

... are you sure that you wouldn't be better using one of these tools
for managing this stuff, both of which are designed to provide central
management and auditing of router configuration?

Regards,
        Daniel

Package: router-audit-tool
Priority: optional
Section: universe/admin
Installed-Size: 304
Maintainer: Javier Fernandez-Sanguino Pen~a <jfs at computer.org>
Architecture: all
Version: 1.1-4
Depends: perl (>= 5.6.0-16), libnet-telnet-perl, libnet-telnet-cisco-perl
Filename: pool/universe/r/router-audit-tool/router-audit-tool_1.1-4_all.deb
Size: 78200
MD5sum: 1ab8c84ebfeaf7abfb2315a220a4af70
SHA1: 14ff9ded2608024e6f0fb17efeaec183d31cd341
SHA256: 3d593a6bfba30dda8ee518e188b1bacb6d8daab2786ebfda72c57a5b492b907a
Description: Tool for auditing Cisco router configuration
 The Router Audit Tool (rat) audits router configurations.
 It will log into the routers specified using provided login
 information, download the configuration and audit against a
 set of provided rules.
 .
 This package also provides the NSA's Cisco Router Configuration
 Guide.
Bugs: mailto:ubuntu-users at lists.ubuntu.com
Origin: Ubuntu

Package: rancid-core
Priority: optional
Section: multiverse/net
Installed-Size: 924
Maintainer: Ubuntu MOTU Developers <ubuntu-motu at lists.ubuntu.com>
Original-Maintainer: Roland Rosenfeld <roland at debian.org>
Architecture: amd64
Source: rancid
Version: 2.3.2~a7-2
Depends: expect, perl, cvs | subversion, passwd, openssh-client | ssh, iputils-ping | ping, debconf (>= 0.2.26) | debconf-2.0, adduser
Suggests: diffstat
Filename: pool/multiverse/r/rancid/rancid-core_2.3.2~a7-2_amd64.deb
Size: 193482
MD5sum: 07840b17f396a1cf58936fa838906130
SHA1: 94bbf1ab75c2089e4c1957fd6d10ab63e272692d
SHA256: f9853944d448869bc37424c9158e4fcba3bb2a5e4cb1634229f7b7cbc3fed6bf
Description: rancid -- Really Awesome New Cisco confIg Differ
 This is a popular ISP toolkit, based on expect and shell scripts,
 for managing router configurations.
 Rancid monitors a router's (or device's) configuration, including
 software and hardware (cards, serial numbers, etc), using CVS.
 Rancid currently supports Cisco routers, Juniper routers, Catalyst
 switches, Foundry switches, Redback NASs, and ADC EZT3 muxes.
 This is the core package.
 .
  Homepage: http://www.shrubbery.net/rancid/
Bugs: mailto:ubuntu-users at lists.ubuntu.com
Origin: Ubuntu



More information about the plug mailing list