FINAL TRIM SIZE : 7.0 in x 8.5 in
4
Copying Files Remotely Using rcp
You can copy les b etween HP-UX or other UNIX hosts on the net
work using
rcp
. Also, using appropriate options, y
ou can copy directories b etween systems
using
rcp
, if the conguration les that the service uses are set up prop erly
.
Preparing to Use rcp
To use
rcp
,you'll need the following prerequisites:
An account (login) on the remote host.
A
.rhosts
le in the remote host home directory con
taining the names of
your lo cal host system and your lo cal login name.
A
.rhosts
le on your lo cal system, as well. This contains the names of all
the systems you will copy from. It will ensure that you will b e able to use
rcp
when you use
rlogin
on the remote system.
Note
A
$HOME/.rhosts
le creates a signicant security risk. To
prevent unauthorized users form gaining
remsh
access to your
remote account and host,
only you
should be able to create
and write to a
.rhosts
le in your remote home directory.
Permissions need to be set accordingly.
A
/etc/host
le on your lo cal system which lists hosts with whichyou can
communicate using ARPA/Berkeley Services. For each host, the le has a
line containing information about the remote host in the follo
wing form:
internet address ocial name alias
You will nd that the
/etc/hosts
le is useful for lo oking up names and
addresses on the network. To facilitate such a lo okup, use the
grep
to ol
described in
grep
(1) and in
Using HP-UX
.
Copying a Local File to a Remote Host
To copy from your system to a remote system, use the follo wing syntax:
rcp
local lename remote hostname
:
remote lename
4-24 Using the Command Line DRAFT
2/5/97 11:31