telnet client and logs

Hello everyone. I have a script that telnets into a linux workstation and restarts a service, while logging the session to a file. I'm kind of new to linux so when I was using windows I would capture something like

windows cli: telnet xxx.xxx.xxx.xxx -f c:/capture.log
...
[me@remote]# /sbin/service dhcpd restart
Shutting down dhcpd: OK]
Starting dhcpd: OK]

Now when using the linux telnet client I capture something like

[me@local]# telnet xxx.xxx.xxx.xxx | tee -a /users/me/capture.log
...
[me@remote]# /sbin/service dhcpd restart
Shutting down dhcpd: [60G[ [0;32mOK[0;39m ]
Starting dhcpd: [60G[ [0;32mOK[0;39m ]

It looks like the telnet session is passing control characters or something like that to the log file, which messes up some scripts that check whether the service was succesfully restarted.
I've already tried playing around with the telnet mode (line vrs char) with no effect. Any ideas on how to get the log with just plain text?

Thanks for any advice and sorry if I posted in the wrong place.

Those control chars are probably ANSI escape sequences to set colors. How to get programs not to print them depends on the program and distro. What are they?

Also,

Is there any reason you would want to use telnet instead of a shared key and SSH?

Thanks for the replies!

Distro is RHEL 5 and program is the telnet client that comes by default. The reason we use telnet is that we use a common function to log into a device for a lot of different device types, and not all of those support SSH.

I guess I'll google for a while about how to avoid writing those ansi control codes but if you guys have any suggestions I'd appreciate em.

Thanks!