Terminal scripting to automate login to cisco devices. Help Please !

Hello,

I am new to the mac world, and would like to automate my login to cisco devices (routers, switches etc...), i am in a need of writing a script that i may just click on an icon on the desktop and it will open terminal and run a few command.

as follow:

telnet to an ip address
type the username and password
log all screen output to a file.

Currently i am using the expect and send command but cannot get the script to work as one piece.

any help in the matter would be appreciated.

here is what i got:

telnet x.x.x.x.x

expect -re "Username:"
send "Admin\r"
expect -re "ass:"
send "XXX\r"

Thanks,

Rasta.

You now if you save a password into a script it is stored in plain text right? By default I don't think telnet supports encryption either. I think you have to turn it on. Do your routers support SSH?

That part I know, I am just trying to make my life easy and not type in the user name and password to all the devices I log into.

Just want to click a file on my mac and have the script
1 open terminal.
2 start loging screen output.
3 open a telnet or ssh for u.
4 trype in my user name and password for the device.

I do these with about 50 logings per day if not more.

So what u got cooking there.

Any ideas.

Thanks.

R