Monday, January 26, 2009

RSH/RCP - quick and easy

This is one of those topics that probably won't be in the exam, but it can't hurt to learn it if its easy enough.

On R3, I have:

R3#sho run | inc rcmd
ip rcmd remote-username R3
ip rcmd source-interface Loopback0


On R5, I have:

R5#sho run | inc rcmd
ip rcmd rsh-enable
ip rcmd remote-host cisco 172.16.0.3 R3 enable
ip rcmd source-interface Loopback0


On R3:
R3#rsh 172.16.0.5 /user cisco sho run int lo0

Building configuration...

Current configuration : 63 bytes
!
interface Loopback0
ip address 172.16.0.5 255.255.255.255
end

R3#

Now Let's do some RCP file copying:

R5(config)#ip rcmd rcp-enable
R5(config)#^Z
R5#copy run r5test.txt
Destination filename [r5test.txt]?
Erase flash: before copying? [confirm]n
Verifying checksum... OK (0xFD5B)
2714 bytes copied in 4.856 secs (559 bytes/sec)
Rack1R5#

Copy from R3:

R3#copy rcp://cisco@172.16.0.5/R5test.txt flash:
Destination filename [R5test.txt]?
Accessing rcp://cisco@172.16.0.5/R5test.txt...
Erase flash: before copying? [confirm]n!
Verifying checksum... OK (0xFD5B)
2714 bytes copied in 0.644 secs (4214 bytes/sec)
R3#


Key things to remember:


-Server side has two names in that rcmd command
-First one must match /user on client
-Second one must match client hostname or client "remote-username" command

1 comment:

  1. looks great!
    one comment from my side:
    "ip rcmd remote-username R3"
    is just setting the username for RCP!
    The RSH username is always the hostname of the client!
    And: when you copy the file you will be asked for the username anyway, so you don't really need to configure it. It just makes it easier as this will be the default suggested username.
    Example:
    copy rcp://RCP@150.1.6.6/c2800nm-adventerprisek9-mz.124-24.T5.bin flash:TEMP
    Here "RCP" is the username.

    ReplyDelete

Note: Only a member of this blog may post a comment.