#!/usr/bin/expect -f spawn telnet 10.21.0.17 expect -re "login" send "admin\n" expect -re "Password" send "supersecurepassword\n" interact
works as expected. After running the script, I logged in at any telent IP address that I used in the spawn telnet 10.21.0.17
Then it returns me to the AP shell
WAP →
How do I execute additional commands? I would like to post reboot , and then maybe sleep 20 and finally exit .
I tried using echo and expect without success. I also tried interact with removal without success. Any ideas?
source share