#!/usr/bin/expect
spawn telnet fritz.box
expect "fritz.fonwlan.box login:"
send "root\n"
expect "Password:"
send "...\n"
expect "root@fritz:/var/mod/root#"
send "/etc/init.d/rc.dsld restart\n"
expect "root@fritz:/var/mod/root#"
send "exit"
exit
ssh [email protected] "/etc/init.d/rc.dsld restart"