Remote command invocation for HP ProCurve switches
This is a bash script that uses expect to interact with HP ProCurve switches. You supply any number of commands separated by comma and they are run remotely. Then the login session is closed.
*nix, bash, expect, ssh enabled in the switch
MAC OS X
git clone https://github.com/nestoru/procurve-commander.git
cd procurve-commander
chmod +x procurve-commander.sh
export SWITCH_PASSWORD=agoodsecret
## show users besides operator and manager
./procurve-commander.sh UserName SwitchDomainOrIP "show snmpv3 user"
## show ssh config status. Note that an exit is required because config command adds a sub-prompt
./procurve-commander.sh UserName SwitchDomainOrIP "config, show ip ssh, exit"