*BSD News Article 83601


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!hunter.premier.net!feed1.news.erols.com!howland.erols.net!vixen.cso.uiuc.edu!news.stealth.net!demos!news.uni-stuttgart.de!news.belwue.de!news-stu1.dfn.de!news-mue1.dfn.de!news-nue1.dfn.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Problems with rlogin or rsh.
Date: 26 Nov 1996 00:01:36 GMT
Organization: Private BSD site, Dresden
Lines: 52
Message-ID: <57dc10$3gb@uriah.heep.sax.de>
References: <57beq0$r4e@gemini.res.otaru-uc.ac.jp>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

k-sato@res.otaru-uc.ac.jp (Kou Sato) wrote:

>     However, I have a few problems with "rlogin" and "rsh". 
>  
>         1. I can not rlogin from machine1 to machine2 nor
>            from machine2 to machine1.  rlogin claims that
>            "invalid user."  

>              * I think my '.rhost' or '/etc/hosts.equiv'
>                 has no problem.

I think it has a problem.  Hard to say if you don't tell us more.

rlogin to the remote machine (using your password), and run a command
like `w' to see what appears as the remote hostname there:

j@uriah 51% w
12:58AM  up 10 days,  1:26, 5 users, load averages: 1.50, 1.39, 1.29
USER     TTY FROM              LOGIN@  IDLE WHAT
j        p1  :0.0             15Nov96  1:11 -tcsh (tcsh)
j        p3  :0.0             15Nov96  1:12 tail -f /tmp/releaselog
j        p4  :0.0              8:19PM     1 elm
j        p5  :0.0             16Nov96 32:15 -tcsh (tcsh)
j        p7  localhost        12:58AM     - w
             ^^^^^^^^^
(here)

That's what you also need in your .rhosts.  Don't forget that .rhosts
files are best kept at mode 0600; they are silently ignored if they
are writable by somebody else than the owner or root.

>        2.  'rcp foo.txt machine2:~/' on machine1 succeeds, but
>            'rcp foo.txt machine1:~/' on machine2 fails.
> 	   stty claims that 'TIOCGETD: Operation not supported.'

I assume you run the csh and have some stty command in your .cshrc.
rsh or rcp sessions don't have an associated tty, hence the stty
fails.  Simply protect it by:

if ($?prompt) then
	stty <whatever you want>
	... <other things you only want while logged in interactively>
endif

(The csh variable `prompt' is only set for interactive shells.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)