[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mgetty "auto-telnet" ??



Kevin Traas wrote:
> 
> I have a Digiboard Portserver II on my LAN that I currently have modems
> "hanging off" of.  I've configured it so that any incoming terminal
> connections are automatically "telnetted" to another location.  This works
> great; however, there are some *serious* performance problems associated
> with the Digiboard PSII.  It is *contstantly* "pausing" - i.e. no traffic
> passes through it for anywhere from 5 to 45 seconds - then everything goes
> back to normal.  Very, very strange!
> 
> Anyway, I want to "dump" this $2000 box for a basic Debian GNU/Linux box
> running on a 486 and a 16port Bocaboard (which I've used and am *very*
> happy with).  So, to get down to my question:
> 
> Do you have any idea on how to setup mgetty to automatically telnet an
> incoming connection to another system.  (i.e. anyone connecting to ttyS31
> should be automatically telnetted to aaa.bbb.ccc.ddd.)
> 

Yes. mgetty will still prompt them for a login, but after that it will
run telnet to the remote machine and as long as the remote telnetd
supports the ENVIRON option the user will not have to type their
login twice. You need to edit the file /etc/mgetty/login.config.
This file controls what program is launched by getty (usually
/bin/login). The first field in each (non-comment) line matches the
user name and the use of '*' for a wildcard is allowed. Ordinarily
there's a line at the end (the first matching line in the file is
used) like this:

*       -       -       /bin/login @

Which means that any user logging in which doesn't match a previous
entry will have /bin/login started for them. The '@' just passes
the user name. You should replace this line with:

*	-	-	/usr/bin/telnet -8 -E -a -l @ target-machine

Actually you may want to consider (for extra security)

*	nobody	nobody	/usr/bin/telnet -8 -E -a -l @ target-machine

Since otherwise telnet will run as root (although -E prevents the
telnet "escape" which would allow a user to run a program).

-- 
Jens B. Jorgensen
jjorgens@bdsinc.com


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: