# README
CPUSH
A go language tool to work with SSH to cisco devices.
It allows to collect the output of commands directly, without logging in. It can cache passwords.
To install
go install github.com/cdevr/cpush/cmd/cpush@latest
Example execution
cpush --device ip-rtr-ch-1 --cmd 'show version'
You can also pass parameters just directly if just specifying device and command:
cpush ip-rtr-ch-1 show version
It also supports just giving you an interactive session on this router:
cpush --device ip-rtr-ch-1 -i
Or the shortcut:
cpush ip-rtr-ch-1
In this case, cpush will interpret the first argument as the router name, and subsequent arguments will be used to send a command.
Run commands on many devices
List a bunch of devices in a file called "devices_shver". For example router1 and router2
# cat devices_shver
router1
router2
# cpush --device file:devices_shver --cmd "show version" --output "shver_%s"
# ls
devices_shver
shver_router1
shver_router2
#
This will create the files "shver_router1" and "shver_router2" that contain the output of the listed devices.
Configure devices
Cpush has special logic to get close to atomic application of configuration pushes.
cpush --device ip-rtr-1 --push 'int lo 99; ip addr 1.0.0.1 255.255.255.0'
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package textfsm Implementation of Google textfsm.
No description provided by the author
No description provided by the author