From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22317 invoked from network); 29 Jun 1998 23:04:06 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 29 Jun 1998 23:04:06 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id SAA15926; Mon, 29 Jun 1998 18:59:55 -0400 (EDT) Resent-Date: Mon, 29 Jun 1998 18:57:12 -0400 (EDT) Message-Id: <199806292258.RAA15514@watts.neog.com> To: zsh-users@math.gatech.edu Reply-to: raye@neog.com Subject: Re: Is there a way to find the Remote Host in ZSH? In-reply-to: Your message of "Mon, 29 Jun 1998 15:31:25 PDT." <980629153125.ZM5401@candle.brasslantern.com> Date: Mon, 29 Jun 1998 17:58:40 -0500 From: Geoff Raye Resent-Message-ID: <"Dh-F93.0.Jt3.8l1cr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1660 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu ["Bart Schaefer"] >On Jun 29, 5:35pm, Sweth Chandramouli wrote: >> it looks like it; on my machine, at least, i have REMOTE_HOSTNAME >> and REMOTE_IPADDRESS defined when i log in: >> >> (astaroth)~: set | grep 'REMOTE' >> REMOTE_HOSTNAME=simon >> REMOTE_IPADDRESS=208.135.210.91 >> >> those aren't being set in any of the system-wide scripts or in >> any of my personal ones, so i'm assuming that they are set by the shell. > >Are they set regardless of whether you rlogin/rsh/telnet/ssh to the remote >machine? > >They could be being set by the rlogin daemon or some such, before the shell >is even started. As an example, ssh sets SSH_CLIENT='ip.you.are.from srcport localport', which would be quite adequate for your uses. As long as you're doing this for customization, rather then security, it'd work quite nicely to parse out the IP. I'd guess that REMOTE_* are being set by some program you're using to connect. (Neither rsh, telnet, nor ssh seem to do so on BSDi, so I'm not sure what you're using.) I'd tend to hold the login daemon responsible. Geoff -- Geoff Raye - geoff@raye.com - MEoW! System Administrator - Neoglyphics Media Corp. - PGP: finger raye@uiuc.edu