Below is a quote from CPAN (perl stuff). I had to do this in the past and as I recall I used an activeX from IpWorks. They provided the interface allowing SSH too. As I recall the biggest problem was passing passwords from the windows box to the Linux box.
John
The most cunning among you might then think a workaround for this: Open a socket to port 23 (the default telnet port) of the remote machine and write directly to it, thus, bypassing the telnet program altogether. Well, although that might sound like a neat idea, it's not. And that's because the telnet protocol requires that certain control data be exchanged between the two machines by sending them along through the same socket connection.
So, it turns out that the problem is much more complicated than it seemed at first. We don't just need to write code to perform socket I/O, but also we need to write code that speaks the TELNET protocol. This is the bad news. The good news is that this code has already been written, and that its author was kind enough to bundle it in a useful module, Net::Telnet, available at CPAN
John Fabiani
Woodland, CA