On Fri, 18 Nov 2011, Jeremy Bullock wrote:
Does anyone know of a way to script configuration changes over SSH to
B5's (maybe S-Series too)? We would like to make batch changes to
multiple switches automatically, so it would need to be automated (no
prompting).
expect is great, you use something like this to send commands (untested, but
should work):
#!/usr/bin/expect -f
#send commands to an enterasys switch (c) 2011 [email protected]
spawn ssh -l admin [lindex $argv 0]
expect "assword:"
send "[lindex $argv 1]\n"
expect "\>"
send "[lindex $argv 2]\n"
expect "\>"
send "exit\n"
usage: ./entcmd 10.1.2.3 MyPassword "set port enable ge.1.2"
Make sure you have all of the host keys in the know_hosts file
This is just an example, you can script much more complex things in
expect/tcl
Regards
Jacek
---
To unsubscribe from enterasys, send email to [email protected] with the body:
unsubscribe enterasys [email protected]