{"id":563,"date":"2010-03-27T09:10:35","date_gmt":"2010-03-27T09:10:35","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=563"},"modified":"2010-03-27T09:10:35","modified_gmt":"2010-03-27T09:10:35","slug":"executing-commands-on-remote-cisco-device-while-logged-into-local-device","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=563","title":{"rendered":"Executing Commands on Remote Cisco Device while logged into Local Device"},"content":{"rendered":"<p>This tip  shows you how one device can execute remote commands on other Cisco  routers or switches to receive command outputs on the local terminal.<!--more--><\/p>\n<p>Example:\u00a0 (172.18.63.4 &#8211; is a remote device)<\/p>\n<blockquote><p>VM-ACCESS-1#ssh -l  shahid 172.18.63.4 &#8220;show ip route&#8221;<\/p><\/blockquote>\n<p>below is the  output;<\/p>\n<blockquote><p>CC<\/p>\n<p>************************************************************************<\/p>\n<p>*****<\/p>\n<p>*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This is a secure System, Authorized  Person Only..!!!<\/p>\n<p>*<\/p>\n<p>************************************************************************<\/p>\n<p>*****<\/p>\n<p>Password:<\/p>\n<p>Codes: C &#8211; connected, S &#8211; static, R &#8211;  RIP, M &#8211; mobile, B &#8211; BGP<\/p>\n<p>D  &#8211; EIGRP, EX &#8211; EIGRP external, O &#8211; OSPF, IA &#8211; OSPF inter area<\/p>\n<p>N1 &#8211; OSPF NSSA external type  1, N2 &#8211; OSPF NSSA external type 2<\/p>\n<p>E1 &#8211; OSPF external type 1, E2 &#8211; OSPF external type 2<\/p>\n<p>i &#8211; IS-IS, su &#8211; IS-IS summary,  L1 &#8211; IS-IS level-1, L2 &#8211; IS-IS<\/p>\n<p>level-2<\/p>\n<p>ia &#8211; IS-IS inter area, * &#8211;  candidate default, U &#8211; per-user<\/p>\n<p>static<\/p>\n<p>route<\/p>\n<p>o &#8211; ODR, P &#8211; periodic downloaded static route<\/p>\n<p>Gateway of last  resort is 172.18.63.1 to network 0.0.0.0<\/p>\n<p>172.18.0.0\/24 is subnetted, 1  subnets<\/p>\n<p>C\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 172.18.63.0  is directly connected, Vlan63<\/p>\n<p>S*\u00a0\u00a0  0.0.0.0\/0 [1\/0] via 172.18.63.1<\/p>\n<p>[Connection to 172.18.63.4 closed by foreign host]<\/p>\n<p>VM-ACCESS-1#<\/p><\/blockquote>\n<p>ANOTHER EXAMPLE:<\/p>\n<blockquote><p>VM-ACCESS-1#ssh  -l shahid 172.18.63.4 &#8220;show ver&#8221;<\/p><\/blockquote>\n<blockquote><p>CC<\/p>\n<p>************************************************************************<\/p>\n<p>*****<\/p>\n<p>*\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This is a secure System, Authorized  Person Only..!!!<\/p>\n<p>*<\/p>\n<p>************************************************************************<\/p>\n<p>*****<\/p>\n<p>Password:<\/p>\n<p>Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M),  Version<\/p>\n<p>12.2(44)SE, RELEASE  SOFTWARE (fc1)<\/p>\n<p>Copyright (c)  1986-2008 by Cisco Systems, Inc.<\/p>\n<p>Compiled  Sat 05-Jan-08 00:15 by weiliu<\/p>\n<p>Image  text-base: 0x00003000, data-base: 0x01900000<\/p>\n<p>ROM: Bootstrap program is C3560 boot  loader<\/p>\n<p>BOOTLDR: C3560 Boot  Loader (C3560-HBOOT-M) Version 12.2(25r)SEE4,<\/p>\n<p>RELEASE SOFTWARE (fc1)<\/p>\n<p>VM-720-iLO uptime is 41 weeks, 1  day, 6 hours, 48 minutes<\/p>\n<p>System  returned to ROM by power-on<\/p>\n<p>System  restarted at 09:32:43 EST Thu Oct 2 2008<\/p>\n<p>System image file is  &#8220;flash:c3560-advipservicesk9-mz.122-44.SE.bin&#8221;<\/p><\/blockquote>\n<p>Source:\u00a0 <span>Shahid Masood at <\/span><a href=\"https:\/\/supportforums.cisco.com\" target=\"_blank\">https:\/\/supportforums.cisco.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tip shows you how one device can execute remote commands on other Cisco routers or switches to receive command outputs on the local terminal.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[32],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/563"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=563"}],"version-history":[{"count":1,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/563\/revisions"}],"predecessor-version":[{"id":564,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/563\/revisions\/564"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=563"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}