[CentOS] telnet to serial connection?

Wed Jan 4 22:21:42 UTC 2006
Young, Darren <Darren.Young at ChicagoGSB.edu>

> so, it seems that what i need is a telnet server running on 
> my CentOS  
> box that, instead of calling /bin/login when someone connects,  
> instead starts up a serial session (i'd prefer something more  
> transparent than minicom, if possible).  anyone have any good ideas  
> on how to do this?  i had been thinking of creating a user for this  
> purpose whose shell was /usr/bin/minicom, but i'm open to other  
> suggestions.

Assuming the network you're on is at least sort of secure, what about a
netcat listener connected to /bin/cu ? If you wanted authentication on
it as well, perhaps a small C program that netcat is connected to can do
the authentication then spawn /bin/cu.

As in:
    nc -l -p 23 -t -e /bin/cu -l <line> -s <speed>

Just noticed my RHEL3 box doesn't have cu installed, but I'm betting
it'd be in a uucp package somewhere.

Change the port, change the line, speed, etc to match whatever you have
running. Could always place netcat behind inetd and tcp_wrappers to
secure down the inbound to a certain ip/subnet. Also, it looks like GNU
Netcat actually has the ability to specify the source that's allowed.