Skip to Content
SSH, The Secure Shell: The Definitive Guide, 2nd Edition
book

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
May 2005
Intermediate to advanced
666 pages
21h 5m
English
O'Reilly Media, Inc.
Book available
Content preview from SSH, The Secure Shell: The Definitive Guide, 2nd Edition

Replacing r-Commands with SSH

SSH and the r-commands (rsh, rcp, rlogin) can coexist peacefully on the same machine. Since the r-commands are insecure, however, system administrators should replace them by their SSH counterparts (ssh, scp, slogin). This replacement has two parts:

  • Installing SSH and removing rsh, rcp, and rlogin; requires some user retraining

  • Modifying other programs or scripts that invoke the r-commands

The r-commands are so similar to their analogous SSH commands, you might be tempted to rename the SSH commands as the r-commands (e.g., rename ssh as rsh, etc.). After all, common commands like these are practically identical in syntax:

    $ rsh -l jones remote.example.com
    $ ssh -l jones remote.example.com

    $ rcp myfile remote.example.com:
    $ scp myfile remote.example.com:

Why not just rename? Well, the two sets of programs are incompatible in some ways. For example, some old versions of rcp use a different syntax for specifying remote filenames.

In the following sections, we discuss some common Unix programs that invoke the r-commands and how to adapt them to use SSH instead.

4.5.1 Concurrent Versions System (CVS)

CVS is a version-control system. It maintains a history of changes to sets of files, and helps coordinate the work of multiple people on the same files. It can use rsh to connect to repositories on remote hosts. For example, when you check in a new version of a file:

    $ cvs commit myfile

if the repository is located on a remote machine, CVS can invoke rsh to access ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Basics for Hackers

Linux Basics for Hackers

OccupyTheWeb .

Publisher Resources

ISBN: 0596008953Errata Page