pirelli_reboot.sh
#!/usr/bin/expect set timeout 20 set name 192.168.1.25 set user admin set password MIPASS spawn telnet $name expect Login: send "$user\r" expect "Password: " send "$password\r" expect ">" send "sh\r" sleep 1 send "reboot\r" expect "... done"