How to set REMOTEHOST - solved!

How to set REMOTEHOST - solved!

Post by Marek Rouch » Sun, 01 Dec 1996 04:00:00

Hi guys and gals!

This is a summary on what I found out about detecting the remote host from
telnet/rlogin connections to a linux box:

1. tcsh cannot determine the remote host with getpeername(), as this
   function requires a socket, and tcsh is connected to a pty. tcsh then
   falls back on the utmp host entry, but that is limited to 16 chars.
2. Both tcpd (a general wrapper for tcp connections, from NetKit-A) and
   telnetd/rlogind can determine the remote host. E.g. tcpd logs contacts
   via syslog, indicating the remote host. One can set a REMOTEHOST
   environment in tcpd, but unfortunately this is being erased by
   telnetd, that sets up a new environment. So the only `clean' solution
   was to edit both telnetd/rlogind (from NetKit-B) to set up the
   environment. The problems I have reported before were due to a silly
   mistake on my behalf. I'm sorry for having taken your time for
   looking at that. This environment variable now makes its way through
   login (the -p [preserve environment] option is used by both daemons)
   and the shell (e.g. bash,tcsh) - voila!
3. As login is usually called with -h <hostname>, one could set the
   environment in login, too.

Best regards



* -----------------------\ *
* Unteres Tor 12          \------------------------------------------------*

* Tel/FAX +49-921-511824          for PGP Public Key                       *


1. setting REMOTEHOST

Can someone remind me where REMOTEHOST gets set for a telnet session?  I
poked around in /etc/defaults and couldn't find it there, and it's not
getting set in a telnet session.  Any reminders? (or even which man page
to check..)


2. Linux compat. with Dell

3. Can I get REMOTEHOST set ?????

4. Default system paths

5. setting REMOTEHOST on linux machine

6. Help ! Tunnel problem

7. Solved: Problem setting up wuftpd

8. alt-ctl-l not working in RedHat 5.1

9. Setting up NW spool to UNIX SOLVED

10. ATI Mach64 GPT aperture size setting *solved*

11. REMOTEHOST~(How to get this?)


13. X :1 -query remotehost