On 19 May, 16:18, SPJ <[EMAIL PROTECTED]> wrote: > Is it possible to run specific commands on cisco router using Python? > I have to run command "show access-list" on few hundred cisco routers and get > the dump into a file. Please let me know if it is feasible and the best way > to achieve this.
Can you access the routers with telnet or do you need to use ssh? I've written loads of Python to access Cisco routers using a wrapper around the standard telnetlib. Telnetlib supplies an excellent expect function which makes this work. It is telnet, though. If I had to use ssh I would probably add it under the same wrapper so that higher level code could work unchanged. There may be a way to route the telnet interractions through openssh or similar externally but I haven't tried that. -- http://mail.python.org/mailman/listinfo/python-list