Yes, I’ve heard of OpenSSH before anyone asks. Even with the weakest encryption, OpenSSH still has more overhead than simple rsh. On my Celeron 333MHz system with a 100Mbps National Semiconductor DP83815, I top out at around 6MB/s. With rsh I can achieve around 10MB/s continuously. Why is this important? Turning rsh on for those special occasions where I’m copying around several hundred gigabytes of data cuts my transfer time almost in half.
Installation is simple.
apt-get install rsh-redone-client rsh-redone-server
You should automagically get the appropriate lines in your /etc/inetd.conf, but if not you’ll want these.
shell stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rshd login stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.rlogind
Check your magic TCP Wrappers files, /etc/allows.{allow,deny}, and ensure that you’re not denying yourself access to the box you want to login to with rsh.
Now, you will need a file named .rhosts, a dot file, in the home directory of the user you wish to be able to connect as. This file must be owned by that user or root and be readable and writeable only by that user. Inside, you will have entries similar to the following.
foohost:~# cat /root/.rhosts host1.example.com root host2.example.com root
You list the fully qualified hostnames to allow connections from and an optional username to allow connections from on the remote host.
You should be able to connect from the remote host now.
host1:~# rsh root@foohost 'cat /etc/hostname' foohost
In my case, I simply specify rsh as the transport for rsync instead of ssh and all is well. Now large file backups and restores are nearly twice as fast.
It would be wise to disable rsh when you are not using it, however, which will probably be most of the time.
On sufficiently fast machines (P4 2GHz, dual P3 1.4GHz) I can fully saturate a 100Mbps pipe using OpenSSH’s default encryption of 3DES, but not everyone has such a beast available as a mere backup server. I’d be curious to see if I can saturate a 1000Mbps pipe as well or if 3DES once again becomes the bottleneck, again prompting rsh use for large backups.