You can enable rsh support on a router to allow users on remote systems to execute commands. However,
our implementation of rsh does not support an .rhosts file. Instead, you must configure a local authentication
database to control access to the router by users attempting to execute commands remotely using rsh. A local
authentication database is similar to a UNIX .rhosts file. Each entry that you configure in the authentication
database identifies the local user, the remote host, and the remote user.
Implementation of rcp
The remote copy (rcp) commands rely on the rsh server (or daemon) on the remote system. To copy files
using rcp, you do not need to create a server for file distribution, as you do with TFTP. You need only to have
access to a server that supports the remote shell (rsh). (Most UNIX systems support rsh.) Because you are
copying a file from one place to another, you must have read permission on the source file and write permission
in the destination directory. If the destination file does not exist, rcp creates it for you.
Although Cisco’s rcp implementation emulates the functions of the UNIX rcp implementation--copying files
among systems on the network--Cisco’s command syntax differs from the UNIX rcp command syntax. The
Cisco IOS software offers a set of copy commands that use rcp as the transport mechanism. These rcp copy
commands are similar in style to the Cisco IOS TFTP copy commands, but they offer an alternative that
provides faster performance and reliable delivery of data. These improvements are possible because the rcp
transport mechanism is built on and uses the Transmission Control Protocol/Internet Protocol (TCP/IP) stack,
which is connection-oriented. You can use rcp commands to copy system images and configuration files from
the router to a network server and vice versa.
You can also enable rcp support to allow users on remote systems to copy files to and from the router.
If you do not specify the/user keyword and argument, the Cisco IOS software sends a default remote username.
As the default value of the remote username, the software sends the remote username associated with the
current tty process, if that name is valid. If the tty remote username is invalid, the software uses the router
host name as the both the remote and local usernames.
Configure the Remote Client to Send rcp Requests
The rcp protocol requires a client to send a remote username on each rcp request to a server. When you copy
a configuration file from a server to the router using rcp, the Cisco IOS software sends the first valid username
in the following list:
1
The username set by the iprcmdremote-username command, if the command is configured.
2
The remote username associated with the current tty (terminal) process. For example, if the user is connected
to the router through Telnet and was authenticated through the username command, the router software
sends the Telnet username as the remote username.
In Cisco products, ttys are commonly used in access servers. The concept of tty originated with UNIX.
For UNIX systems, each physical device is represented in the file system. Terminals are called tty devices
, which stands for teletype , the original UNIX terminal.
Note
1
The router host name.
For bootcommands using rcp, the software sends the router host name; you cannot explicitly configure the
remote username.
The Integrated File System Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3650 Switches)
4
Configuring Basic File Transfer Services
Use of a Router for rsh and rcp