Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux-to-Linux copying?



JC,

--- Jean-Christian Imbeault <jean_christian@example.com> wrote:
> I am using rcp to copy files between two linux machines.
> 
> I ran into a small "permission denied" problem which I fixed by
> adding a .rhosts file on the receiving machine which contains 
> the source machine's ip address.
> 
> Some questions come up though:
> 
> 1- Is rcp the fastest way to copy files from one Linux machine to
> another over a network?

It is most likely limited by your network bandwith any way you do it.

> 2- Is this what .rhosts file is for?

Yes.

> 3- Is there a way to make rcp not over-write files?

Probably not.

> 4- Is having a .rhost file safe?

No.

> 5- where should the .rhosts file located?

Typically in the user's home directory.

> 6- How can I make a .rhosts file for the whole machine (instead of a
> user specific one)?

Yes. 

rsh is from a bygone era in computing, when the network was a safer
place. You should be using ssh instead of rsh (or telnet). ssh uses
public keys to authenticate users and encrypts the data transmission.
The scp utility that comes with ssh is a drop-in replacement for
rcp. 

ssh is pretty easy to set up, so easy that the documentation doesn't
tell you how to do it :-). Most modern distributions include it,
though I usually compile myself from the source at
http://www.openssh.com/

Basically, you need to run sshd on the server (e.g. from /etc/rc2.d),
generate keys under the user account transferring the files on
bothe machines (using ssh-keygen), then copy the public key on the
sending machine to the receiving machine. 

If you leave the passphrase blank for the key on the sending machine,
then you can run scp unattended.

For more sophisticated applications, you might want to look at rsync,
which can use ssh in the background for the communication. 

> 
> Jc
> 

Regards,
Jake

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links