How to "port" a large config file to an automated telnet script?
Im trying to make a script to automatically put the configs in to factory
default Dlink 3200 switches. (ssh is no option it's disabled by default)
After trying with the"expect" function I switched to "echo" because I
couldn't get expect to work.
I can now automatically log in:
( echo open 10.90.90.90 sleep 2 echo "admin" sleep 1 echo "admin" sleep 1
) | telnet
But here is my problem; the config file that needs to be included is 900
lines long, so I am looking for a way to execute the commands in the
config file, without having to copy/paste echo & sleep for each line...
Do you guys know a way to help me out?
Thanks in advance,
Michel
No comments:
Post a Comment