Configuring Additional File Transfer Functions
Configuring a Router to Use rsh and rcp
Note When support for incoming rcp requests is disabled, you can still use the rcp commands to copy images from remote servers. The support for incoming rcp requests is distinct from its ability to handle outgoing rcp requests.
The following example shows how to add two entries for remote users to the authentication database and then enable the software to support remote copy requests from remote users. The users, named netadmin1 on the remote host at IP address 172.16.15.55 and netadmin3 on the remote host at IP address 172.16.101.101, are both allowed to connect to the router and remotely execute rcp commands on it after the router is enabled to support rcp. Both authentication database entries give the host name Router1 as the local username. The last command enables the router to support for rcp requests from remote users.
ip rcmd
Configuring the Remote 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 ip rcmd
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.
Note For Cisco, 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.
3.The router host name.
For boot commands using rcp, the software sends the router host name; you cannot explicitly configure the remote username.
For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username.
If you are writing to the server, the rcp server must be properly configured to accept the rcp write request from the user on the router. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the rcp server. For example, if the router contains the following configuration lines.
hostname Rtr1
ip rcmd
and the router’s IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:
Router1.company.com Rtr1
Refer to the documentation for your rcp server for more details.
Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.1