If you are using a Linux (or Unix) machine, you are commonly advised to use the Secure Copy (
scp) program for transferring files between machines. This program uses the Secure Shell (
ssh) to transfer files in an encrypted format. Any person trying to intercept the traffic by capturing packets between the two machines is not able to decipher the transferred contents.
So far so good. However, there is one side-effect of using encryption for file transfer; it is slow. For example, you could try this yourself. Set up two machines that will be transferring files over the network. Transfer a large file (typically 1 GB or more) between the two machines using
scp. Now set up a web server on one of the machines and make the large file available for download. From the second machine, use
wget to download the large file. It is very likely that the download speed was significantly higher in the case of using a web server, than in the case of
scp. (As a matter of clarification, when sensitive files are being transferred, the use of
scp is recommended. However, not all files qualify for this requirement.)
Before the days of scp, there was the rcp. Just like
ssh has become the recommended remote login program over
scp is now favoured instead of
rcp. However, in case the communication between the two machines happens over a trusted network (like a private LAN), it may be safe to use
rcp for the file transfer.
If you try using
rcp without any preparation, then you will encounter a
Permission denied error that does not give any further information regarding the actual problem. Some background preparation is necessary before this transfer will be allowed.
- Install the
xinetdpackages, as required. Depending on your Linux distribution, this might be available in a DVD or on-line repository.
- Configure the
rloginservices to be started by running the commands:
- If required, allow the traffic on TCP ports 513 and 514. (During testing between two machines within a private LAN, it may be okay to disable the firewall temporarily.
rexecas entries in the
- In the user’s home directory of the remote machine, create a
.rhostsfile with contents similar to the following (as applicable):
- On the local machine, run the command:
- If you need time statistics for comparison, you can always run the command with the
This procedure requires the
.rhosts file to have host names instead of IP addresses. Resolution by DNS or the
/etc/hosts file is required. Let us know if you have any problems running this procedure. As a comparison, we have observed 80 MB/s (bytes, not bits) transfer speeds that come close to the hard disk transfer speeds of our simple desktops on a Gigabit LAN.