This is an old revision of the document!
server# apt install expect server# cat router.exp
#!/usr/bin/expect spawn telnet router send "\n" expect "sword:" { send "cisco\n" } expect ">" { send "enable\n" } expect "sword:" { send "cisco\n" } expect "#" { send "copy tftp://server/router.acl runn\n" } send "\n" send "\n" expect "#" { send "exit\n" } send_user "\n" exit 0
server# chmod +x router.exp server# ./router.exp