[plug] Linux replacing terminal server
Cameron Patrick
cameron at patrick.wattle.id.au
Wed Apr 2 20:27:18 WST 2003
On Wed, Apr 02, 2003 at 11:09:57AM +0800, Bernd Felsche wrote:
| Just wondering if there's a perversion of getty that would
| automatically allow a Linux box to present its serial ports to dumb
| terminals as though it were connecting straight through to another
| host. i.e. to act like a dedidated terminal server.
Why do you want or need to use getty at all? Unless I'm missing
something, a simple shell script would do the trick.
------------
#! /bin/sh
exec <$1 >$1 2>$1
export TERM=whatever
export SHELL=/bin/false # telnet subshell paranoia
export PATH=/bin:/usr/bin:/usr/local/bin
# etc
stty [stuff appropriate to your terminals]
while true; do
clear
telnet server.host.name
done
------------
As far as I can tell, this shouldn't be a security problem. If you're
paranoid about telnet having holes you could run it as user nobody in a
chroot gaol. (man telnet on my machine mentions the ! command for
running a subshell, but it doesn't actually work so far as I can tell.)
CP.
More information about the plug
mailing list