zsh-users
 help / color / mirror / code / Atom feed
From: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>
To: zsh-users@math.gatech.edu
Subject: Re: Is there a way to find the Remote Host in ZSH?
Date: Mon, 29 Jun 1998 17:35:15 -0400	[thread overview]
Message-ID: <19980629173515.15910@astaroth.nit.gwu.edu> (raw)
In-Reply-To: <199806292026.QAA10696@ocalhost>

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
<sweth@gwu.edu> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html">*</a>


  reply	other threads:[~1998-06-29 21:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-29 20:26 Timothy J Luoma
1998-06-29 21:35 ` Sweth Chandramouli [this message]
1998-06-29 22:31   ` Bart Schaefer
1998-06-29 22:58     ` Geoff Raye
1998-06-29 21:41 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980629173515.15910@astaroth.nit.gwu.edu \
    --to=sweth@astaroth.nit.gwu.edu \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).