cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2431
Views
5
Helpful
1
Replies

Is it possible to use EEM to login via SSH to another device, and execute commands ?

czunigab
Cisco Employee
Cisco Employee

Good day Community,

My question is as follows, is it possible to configure an EEM script to log into another device (router or ASA to be more specific) and once logged into the device via SSH send commands to it configured on the EEM ?

 

Thank you in advance for your time

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

Yep, this is possible with something simple like this applet:

 

event manager applet ssh

 event none

 action 1.0 cli command "enable"

 action 2.0 cli command "ssh -l user 10.1.1.1" pattern "assword:"

 action 3.0 cli command "mypassword" pattern ">"

 action 4.0 cli command "show version" pattern ">"

 action 5.0 cli command "exit"

 

You can also look at my more complex Tcl policy at http://www.cisco.com/assets/cdc_content_elements/docs/ios/eas/easy-shell.tar .