From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21647 invoked from network); 29 Jun 1998 21:40:06 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 29 Jun 1998 21:40:06 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id RAA12618; Mon, 29 Jun 1998 17:34:43 -0400 (EDT) Resent-Date: Mon, 29 Jun 1998 17:31:50 -0400 (EDT) Message-ID: <19980629173515.15910@astaroth.nit.gwu.edu> Date: Mon, 29 Jun 1998 17:35:15 -0400 From: Sweth Chandramouli To: zsh-users@math.gatech.edu Subject: Re: Is there a way to find the Remote Host in ZSH? Mail-Followup-To: zsh-users@math.gatech.edu References: <199806292026.QAA10696@ocalhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89 In-Reply-To: <199806292026.QAA10696@ocalhost> Resent-Message-ID: <"Q0b-n1.0.v33.5V0cr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1657 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mon, Jun 29, 1998 at 04:26:56PM -0400, Timothy J Luoma wrote: > > I am looking for a way to get the complete hostname or IP address where I > have connected _from_ when making a telnet/ssh/etc connection. [snip] > Is there a way to do this already that I just don't know about? 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. the sad thing is that until you asked this, i was using an even uglier kludge than yours to pull my remote host from the lastlog. on a mildly related note, does anyone know if wtmpx (on solaris, at least) stores the full name of the remote host, and last/finger simply truncates it? the manpage on wtmpx defines ut_host as char ut_host[257]; i don't know any c, but assume this means that it is a 257-byte character field. -- sweth. -- Sweth Chandramouli IS Coordinator, The George Washington University / (202) 994 - 8521 (V) / (202) 994 - 0458 (F) *