rcp

Israel Pinkas ~ pinkas at hobbit.intel.com
Thu Mar 2 08:08:32 AEST 1989


In article <18479 at adm.BRL.MIL> Leisner.Henr at xerox.com (Marty) writes:

> Here's (hopefully a simple one) --
>
> I want to rcp between two machines which support it.
>
> I have different accounts on both machines.
>
> I've looked at the documents on .rhosts files and I'm not sure what it's
> all about..  I have each machine with an  .rhosts file in my home directory
> which looks like:
> host1 user1
> host2 user2
>
> No matter what I do (I'm playing with rsh and rcp) I get:
> Permission denied.  
>
> I have no problem rcp'ing from each machine with NCSA telnet on ms/dos.
> (There's no password protection or security enabled with NCSA telent). Now
> how do I get these machines to talk rcp to each other?
>
> (FTP works with no problem -- but I want something a little more seamless).

The man pages for all the machines that I use (Ultrix & sunOS) state that
you need to do something like:

	rcp mach.user:file localfile

Rcp is similar to cp, in that you need to specify at leas two names on the
command line.  When there are more than two, the last must be a directory.
Rcp also allows the -r flag, which does recursive copies.  (The last file
must be a directory.)  Some version of rcp have other flags, but they are
not universally supported.

Rcp uses the following as a filespec:

	[remotemach[.remoteuser]:][filename]

The filename is the name of a file specified on the appropriate machine.
It may be either the name of a file, or a directory, as appropriate.  It
need not exist, if the conext allows that.  (That is, the destination file
need not exits.

When remotemach (with the :) is not specified, the filename is taken to be
on the local machine.  When remoteuser is not specified, it defaults to the
name of the current user.  (Different implementations vary on whether real
uuid or su'ed uid is used when su'ed.)  If filename is nonexistent (only
valid for destination), . is assumed (that is, the login directory for
remoteuser.  Filename must be present if remotemach is absent.

That is, the following are valid:

	localfile
	remotemach:file
	remotemach.remoteuser:remotefile
	remotemach:		# only for destination
	remotemach.remoteuser:	# ditto

Hope this helps.

-Israel
--
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com at relay.cs.net
CSNET:	pinkas at cadev4.intel.com



More information about the Comp.unix.questions mailing list