rsh
RSH to Cisco router
23/11/10 16:16
We need to enable rsh on the router, specifying ip address and username of the host sending commands. A local username is also needed, it can be the same as the hostname or different:
R(config)#ip rcmd rsh-enable
R(config)#ip rcmd remote-host ROUTER 10.0.0.100 ifconfig enable
“ROUTER” is the local name
“ifconfig” is the username to be used on the host connecting
Enabling debug on the router shows rsh connections:
R#deb ip tcp rcmd
Now let’s open a terminal window on OSX and send some commands to the router:
iMac:~ ifconfig$ rsh -l ROUTER 10.0.0.254 sh clock
16:32:07.465 ROME Tue Nov 23 2010
This is the output of the debug command:
038709: Nov 23 16:33:38.104 ROME: RCMD: [514 <- 10.0.0.100:951] recv 950\0
038710: Nov 23 16:33:40.309 ROME: RCMD: [514 <- 10.0.0.100:951] recv ifconfig\0ROUTER\0sh clock\0
038711: Nov 23 16:33:40.309 ROME: RCMD: [514 -> 10.0.0.100:951] send
It works!