Radio Shack FC-241 manual Executing Commands Remotely Using rsh, FC-250

Page 10

Configuring Additional File Transfer Functions

Configuring a Router to Use rsh and rcp

Note When support of incoming rsh commands is disabled, you can still issue an rsh command to be executed on other routers that support the remote shell protocol and on UNIX hosts on the network.

The following example shows how to add two entries for remote users to the authentication database, and enable a router to support rsh commands from remote users:

ip rcmd remote-host Router1 172.16.101.101 rmtnetad1

ip rcmd remote-host Router1 172.16.101.101 netadmin4 enable ip rcmd rsh-enable

The users, named rmtnetad1 and netadmin4, are both on the remote host at IP address 172.16.101.101. Although both users are on the same remote host, you must include a unique entry for each user. Both users are allowed to connect to the router and remotely execute rsh commands on it after the router is enabled for rsh. The user named netadmin4 is allowed to execute privileged EXEC mode commands on the router. Both authentication database entries give the router’s host name Router1 as the local username. The last command enables the router for to support rsh commands issued by remote users.

Executing Commands Remotely Using rsh

You can use rsh to execute commands remotely on network servers that support the remote shell protocol. To use this command, the .rhosts files (or equivalent files) on the network server must include an entry that permits you to remotely execute commands on that host.

If the remote server has a directory structure, as do UNIX systems, the rsh command that you issue is remotely executed from the directory of the account for the remote user that you specify through the /user username keyword and argument pair.

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.

To execute a command remotely on a network server using rsh, use the following commands in user EXEC mode:

 

Command

Purpose

Step 1

 

 

enable [password]

Enters privileged EXEC mode.

Step 2

 

 

rsh {ip-address host} [/user username]

Executes a command remotely using rsh.

 

remote-command

 

 

 

 

Cisco IOS Configuration Fundamentals Configuration Guide, Release 12.1

FC-250

Image 10
Contents Additional Functions Task List Configuring a Router as a ServerFC-241 Performing Prerequisite Tasks Configuring a Router as a Tftp ServerFC-242 Configuring the Server FC-243Configuring the Client Router FC-244FC-245 Client show versionConfigures the router as a Rarp server Configuring a Router as a Rarp ServerFC-246 Router a has the following configuration FC-247Outgoing rsh and rcp traffic Configuring a Router to Use rsh and rcpDisabling DNS Reverse Lookup for Rcmd FC-248Maintaining rsh Security Configuring a Router to Use rshDisables Domain Name Service DNS lookup for rsh and rcp CommunicationsExecuting Commands Remotely Using rsh FC-250Configuring a Router to Use rcp FC-251Configuring the Remote to Send rcp Requests FC-252Configuring FTP Connections Configuring a Router to Use FTP ConnectionsFTP Configuration Task List FC-253FC-254