SUMMARY: rsh, which host is calling me ?

From: Thomas Bleek (bl@gfz-potsdam.de)
Date: Mon Oct 17 1994 - 04:52:14 CDT


I'm still interested in a solution.
Original Q:
> We want to use remote shells from PC to a Sun with SunOS 4.1.1.
> ( I know rsh from PC is no good idea for security reasons, but ... )
> There is one special account on the sun, with a sh-script as loginshell.
> Now I want to detect the name of the calling host in this script.
> Unfortunately I found no way to do this.
> Thanks for any hints, Thomas
I got 7 responses, the summary: no way, perhaps some perl-scripts will do
but I didn't got any hints, how they would do it. I must realize, that 5of7
didn't understand my mail exactly. I know that I can use who to get
the hostname, from which I'm logged on. The problem is, that I don't want to
login, I want to use rsh. But rsh isn't seen by w who or who am i.... 8-(
Thanks to all, who has responded.
Thomas
##########################################################################
> From louis@meg.meg.saic.com Sat Oct 15 00:36:37 1994
> From jeff@bundy.cnet-pnw.com Fri Oct 14 22:59:41 1994
> From rwolf@dciem.dnd.ca Fri Oct 14 20:32:30 1994
> From lturetsk@aida.econ.yale.edu Fri Oct 14 21:10:59 1994
> From roberto@banach.nl.nuwc.navy.mil Sat Oct 15 16:17:33 1994
> From raoul@MIT.EDU Sat Oct 15 20:51:51 1994
> From Peter.Schwarze@oi54.kwu.siemens.de Mon Oct 17 08:02:33 1994
>
##########################################################################
> From louis@meg.meg.saic.com Sat Oct 15 00:36:37 1994
> You might get lucky with the w(1, I think) command. A little awk may
> be in order, as well.
>
> From jeff@bundy.cnet-pnw.com Fri Oct 14 22:59:41 1994
> I can see two ways to do this.
> 1) rewrite your sh-script login shell in PERL and have PERL handle the
> connection for you. It can get the calling hosts ip addr.
may be, I don't know enough about perl.
>
> 2)Install TCP wrappers on the rsh port, and it will log the callers ip addr
I don't want to log the requests outside the script. I'm looking for an easy
way to get the calling host IN the script.
>
##########################################################################
> From rwolf@dciem.dnd.ca Fri Oct 14 20:32:30 1994
> I do not think it is possible to know the caller.
> You may have to pass the calling hostname as parameter of the rsh call.
I don't want to have an "intelligence" on the PC.
> I would be very interested in your findings.
>
##########################################################################
> From lturetsk@aida.econ.yale.edu Fri Oct 14 21:10:59 1994
> I asked a very similar answer on comp.unix.shell (this isn't a
> sun-specific issue) about a month ago, and this is the best answer I got.
> Not good enough for my purposes, but it may do for you (I need to know
> aida.econ.yale.edu, not just aida.econ).
Unfortunately this is not what I want. I don't want to rlogin, just rsh.
he sent me a .login, which sets the DISPLAY variable, but ...
> ---------- Forwarded message ----------
> This may not be what you are looking for, but it's related. I wrote
> this perl script to allow a user to rlogin and set DISPLAY without
> typing the name of the home machine explicitly. You may extract
> whatever ideas you find useful.
>
>
> #!/usr/local/bin/perl
....
deleted [ send me mail, if you are interested ]
>
##########################################################################
> From roberto@banach.nl.nuwc.navy.mil Sat Oct 15 16:17:33 1994
> You can use logdaemon, available from ftp.win.tue.nl. It provides logging
> and access control for rexecd, rlogin, rsh, etc.
fine, but not what I want 8-(.
>
##########################################################################
> From raoul@MIT.EDU Sat Oct 15 20:51:51 1994
> There is no graceful way to do this. One fashion is to put an environment
> variable based on the hostname in everyone's .login, and export it to remote
I have only one special account for this purpose. It will be used from
many hosts.
> environments. Xrsh, available from ftp.x.org, does something similar with
> the DISPLAY variable.
>
##########################################################################
> From Peter.Schwarze@oi54.kwu.siemens.de Mon Oct 17 08:02:33 1994
> Hallo,
>
> eine Loesung bekommen Sie ueber das Kommando 'who':
he told me, that the solution is who and who am i 8-(((((
##########################################################################

-- 
Dr. Thomas Bleek
Netzwerkadministrator
GeoForschungsZentrum Potsdam, Rechenzentrum
Telegrafenberg A51
D-14473 Potsdam
Tel.: +49 331 288- 1689/1681 Fax.: 1703
E-Mail: bl@gfz-potsdam.de, postmaster@gfz-potsdam.de



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:12 CDT