cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1746
Views
5
Helpful
4
Replies

SSH to W5508 Controller

Hi All

 

I'm trying to automate the enable and disable of a specific WLAN on 5508 Wireless Controller.

 

Having used Event Manager Applet to shut down / enable an interface previously I thought it would make sense to use it again to do this. The script keeps ending with:

 

show event manager history events

10 43 Actv abort Tue Nov 6 10:43:00 2018 timer cron applet: Wlan3Shut

 

Below is the config I used. Can anyone help me out?

 

event manager applet Wlan3Shut
event timer cron name Wlan3Shut cron-entry "43 10 * * *" maxrun 60
action 1.1 cli command "enable"
action 1.2 cli command "ssh 10.X.X.X" pattern "User:"
action 1.3 cli command "myusername" pattern "Password:"
action 1.4 cli command "mypassword" pattern ">"
action 1.5 cli command "config" pattern "config>"
action 1.6 cli command "wlan disable 3" pattern "config>"
action 1.7 cli command "exit" pattern ">"
action 1.8 cli command "logout " pattern ">"
action 1.9 cli command "n" pattern "(y/N)"

 

 

 

 

This is the output if I SSH Manually to the 5508 from the switch.

 

SwitchName#ssh 10.X.X.X


(Cisco Controller)
User: MYUSER
Password:**********
(Cisco Controller) >conf
(Cisco Controller) config>wlan disable 3


(Cisco Controller) config>exit

(Cisco Controller) >logout
The system has unsaved changes.
Would you like to save them now? (y/N) n
[Connection to 10.X.X.X closed by foreign host]

 

 

Many Thanks!

Rob

 

 

1 Accepted Solution