[f-nsp] scripting
Bruce Rodger
Bruce.Rodger at strath.ac.uk
Fri Jul 10 09:39:11 EDT 2009
Nick,
> Second: for the times that it's just not possible, it would be *super*
> useful to be able to use ssh in the old rsh style of running a command
> against a switch without logging into it (eg using a passphrase-less
> rsa key) and without having to navigate the prompt.
>
> With Cisco devices running IOS (or unix hosts running sshd), you can
> do things like this:
>
> unixhost:~ > ssh user at router show ver
Check out the "flogin" command that comes with "rancid" - see
http://www.shrubbery.net/rancid/
For those who don't know, Rancid is a tool that will regularly trawl
round your network retrieving configs from routers etc, and if it
sees any changes will store them in a CVS archive, and mail the
diffs to you. It's useful to run it once a day to keep an archive
of your configs; it's sometimes even more useful to run it every half hour -
it lets you know if your colleagues are working on any router
configs!
Part of the rancid package is a collection of "expect" scripts to
remotely log into most common routers and execute a command -
"flogin" is the Foundry one. So, once set up, you could achieve
"ssh user at router show ver" on a Foundry box with:
flogin -c "show ver" router
Bruce
--
Bruce Rodger |Bruce.Rodger at strath.ac.uk
Network Manager, IT Services |http://www.strath.ac.uk/IT/People/bruce.html
The University of Strathclyde | +44 (0)141 548 3300
Glasgow G4 0LN, Scotland. | Fax 553 4100
"The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263."
More information about the foundry-nsp
mailing list