[plug] Linux replacing terminal server

Craig Ringer craig at postnewspapers.com.au
Wed Apr 2 17:43:39 WST 2003


> I'm looking for one to "forward" a local serial port to either a
> telnet, rlogin or ssh port on a remote machine.

Any chance you can provide a more detailed description of what you're 
trying to do?

I presume it comes down to trying to use an ip-capable linux box as a 
"serial-line over IP" extender. The question is, is the linux box on the 
dumb-terminal end (eg serial line dumb terms connected to linux box 
which talks to server over IP) or the server side (non-ip-capable server 
with linux box proxying serial access <-> telnet from dumb-ish IP clients)?

In the first case, it should be alright to have telnet with a null 
escape string running in inittab on the linux box, attached to the 
serial lines and connecting to the server. Its usually possible to 
adjust the timeouts on telnet login attempts etc to reduce the "display 
waking" issues you saw. You could always have a script that sleeps 
waiting for a keypress to initiate the telnet session  - "press any key 
to begin" - listening on the serial line. If you also run telnet 
unpriveleged, this might be OK.

In the second case, your dumb-ish clients can be doing something 
unspeakable with rlogin, to get an automatic and unprotected shell on 
the linux box using rhosts. However, the account's .profile would be 
something like this:

	exec minicom

so that logging in would only get you dumped directly to a minicom login 
screen on a serial line. You'd have to find a way to stop the users 
breaking into a subshell with minicom though - perhaps running it 
chrooted with no visible shell binaries might do the trick.

Just a few ideas, sorry if I've totally misunderstood or am making no 
sense - I'm trying to make a lot of a relatively small amount of info in 
your email.

> I've only been doing that sort of thing since 1985. :-)

Sorry. I tend to work on the theory that more information does no harm, 
but assuming somebody knows more than they do can confuse and be very 
unhelpful.

Of course, sometimes I just manage that too...

>>Have you tried killing off getty entirely, and having /usr/bin/telnet 
>>sessions running automatically on a couple of ttys on the clients? Its 
>>ugly, but it might work. Never tried it myself, though.
> 
> When the remote host closes the telnet (e.g. after timeout with no
> login), init will respawn. That's a PITA as it results in the screen
> savers of dumb terminals being tickled all the time.

Perhaps you can have a script waiting for a keypress before starting the 
telnet session, as mentioned above - start that from inittab instead.




More information about the plug mailing list