Subject: Re: determining originating IP address of current rsh session
To: Laine Stump <>
From: Andrew Gillham <>
List: netbsd-users
Date: 03/19/2000 16:06:04
Laine Stump writes:
> Yes, it's fairly straightforward, and it works well. (Thanks, Andrew!) I
> would prefer something that could be done completely with sh and awk (and
> was portable to other OSes) so that I could just install a single shell
> script that would work on anything, but this is definitely better than
> nothing.

Well, tcsh sets 'REMOTEHOST' if that is an option.  I recall having a 
problem with tcsh that forced me back to sh which needs getpeer.
I think the tcsh issue was related to it not setting up the path
correctly.  E.g. 'rsh host command' wouldn't find command in $HOME/bin
which was added to the path in .cshrc/.login, or /etc/csh.*.

Andrew Gillham                            | This space left blank                     | inadvertently.
I speak for myself, not for my employer.  | Contact the publisher.