Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

While Logging In, One Device Can Execute Remote Commands on Other Cisco Routers or Switches

This Reader Tip by Shahid Masood shows you how one device can execute remote commands on other Cisco routers or switches to get commands outputs on one terminal.

Example:

VM-ACCESS-1#ssh -l shahid 172.18.63.4 "show ip route"

172.18.63.4 - is a remote device

below is a output;

1)- VM-ACCESS-1#ssh -l shahid 172.18.63.4 "show ip route"

CC

************************************************************************

*****

*         This is a secure System, Authorized Person Only..!!!

*

************************************************************************

*****

Password:

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

        E1 - OSPF external type 1, E2 - OSPF external type 2

        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS

level-2

        ia - IS-IS inter area, * - candidate default, U - per-user

static

route

        o - ODR, P - periodic downloaded static route

Gateway of last resort is 172.18.63.1 to network 0.0.0.0

      172.18.0.0/24 is subnetted, 1 subnets

C       172.18.63.0 is directly connected, Vlan63

S*   0.0.0.0/0 [1/0] via 172.18.63.1

[Connection to 172.18.63.4 closed by foreign host]

VM-ACCESS-1#

2)- VM-ACCESS-1#ssh -l shahid 172.18.63.4 "show ver" 

                      

CC

************************************************************************

*****

*         This is a secure System, Authorized Person Only..!!!

*

************************************************************************

*****

Password:

Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M), Version

12.2(44)SE, RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2008 by Cisco Systems, Inc.

Compiled Sat 05-Jan-08 00:15 by weiliu

Image text-base: 0x00003000, data-base: 0x01900000

ROM: Bootstrap program is C3560 boot loader

BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(25r)SEE4,

RELEASE SOFTWARE (fc1)

VM-720-iLO uptime is 41 weeks, 1 day, 6 hours, 48 minutes

System returned to ROM by power-on

System restarted at 09:32:43 EST Thu Oct 2 2008

System image file is "flash:c3560-advipservicesk9-mz.122-44.SE.bin"

Version history
Revision #:
1 of 1
Last update:
‎10-05-2009 08:11 AM
Updated by:
 
Labels (1)
Everyone's tags (1)