Path: utzoo!attcan!uunet!dialogic!drich From: drich@.UUCP (Dan Rich) Newsgroups: comp.protocols.tcp-ip Subject: Re: rsh vs remsh -- how does one handle the name conflict? Message-ID: <1066@dialogic.UUCP> Date: 1 Feb 90 19:31:02 GMT References: <9001311506.AA04448@ucbvax.Berkeley.EDU> <11004@encore.Encore.COM> Sender: news@dialogic.UUCP Reply-To: drich@dialogic.UUCP (Dan Rich) Organization: Dialogic Corp., Parsippany, NJ Lines: 44 I decided I was tired of having to know which machine I was on, and wrote the script below. By listing the various remote shell programs in the variable RSHELL, you can let this script figure out which one to run. Then, you can name the script anything you find convient and place it somewhere in your path (I use /usr/public/bin/rsh, that way it is available on all of our machines). One other thing. As I mentioned earlier, under System V (or at least with ISC's tcp/ip), you can't just rename the remote shell program. Rsh is written so that it can be linked to programs bearing the names of machines on your network. It will then attempt to run a remote shell on that machine. (ie. If I link rsh to dialogic, typing 'dialogic' will run a remote shell on the machine dialogic.) 8<------------------------------ Cut Here ------------------------------>8 #! /bin/sh # $Id: rsh,v 1.1 90/02/01 10:41:01 drich Exp $ # # rsh - remote shell that will work on any(?) machine # # $Log: rsh,v $ # Revision 1.1 90/02/01 10:41:01 drich # Initial revision # # RSHELLS="/usr/ucb/rsh /usr/bin/rshl" for i in $RSHELLS do if [ -f $i ] then RSH=$i fi done $RSH $* 8<------------------------------ Cut Here ------------------------------>8 -- Dan Rich | ARPA: drich%dialogic@uunet.uu.net UNIX Systems Administrator | UUCP: uunet!dialogic!drich Dialogic Corporation | - Time is an illusion. Lunchtime, doubly so. - (201) 334-1268 x213 | Douglas Adams