rsh, remote user and host...

Claude Cantin cantin at nrccsb3.di.nrc.ca
Thu Apr 18 23:48:29 AEST 1991


I am in the process of writting a utility which uses "rsh" (remote shell) to
a centralized server.  The account used on the server has no passwords, and
the shell used is one I wrote, using C.  To do what I want it do do, that shell
must know the remote host and remote user calling it.

The centralized server is a Sun 3/160, running SunOS 4.0.3.  The remote systems
are Silicon Graphics machines running IRIX 3.3.2, and Suns running SunOS 4.0.3
and SunOS 4.1.1.

Now, for the server to get the remote user and remote host is easy IF THE 
REMOTE SYSTEMS ARE SGIs.  It simply looks at the REMOTEUSER and REMOTEHOST
environment variables.

***  THERE is NO such environment variables on the Suns!!!

If the remote system is a Sun, how can I find out the remote user and 
remote host names????  Any suggestions??

Thanks You,

         Claude Cantin
         National Research Council
-- 


	Claude Cantin				tel: (613) 993 0240
	M-60, Chemin Montreal			FAX: (613) 954 2561



More information about the Comp.unix.wizards mailing list