Home / Articles / Scripts / Expect Script for Cisco Devices

Expect Script for Cisco Devices

#!/usr/bin/expect
spawn ssh user@192.168.0.1
expect “user@192.168.0.1’s password:”
send “passwdr”
expect “>”
send “enr”
expect “Password:”
send “passwdr”
expect “#”
send “conf tr”
expect “#(config)”
send “wr mr”
expect “#(config)”

Share


Comment on Expect Script for Cisco Devices

Leave a Reply






Contact Us