Wireless Access

last person joined: 16 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Can I invoke Aruba Command without tty ?

This thread has been viewed 0 times
  • 1.  Can I invoke Aruba Command without tty ?

    Posted Dec 08, 2014 09:52 PM

    I tried to get result of "show clients" from RAP-109 by ssh command as
    below.
    but, RAP-109 returns "Aborted" message.

     

    # ssh admin@10.0.0.1 "show clients"
    Warning: Permanently added '10.0.0.1' (RSA) to the list of known hosts.
    admin@10.0.0.1's password: ********
    Aborted

     

    Can I invoke Aruba Command without tty ?



  • 2.  RE: Can I invoke Aruba Command without tty ?
    Best Answer

    EMPLOYEE
    Posted Dec 13, 2014 02:18 AM

    Hi Mitsuhiro-san,

     

    Unfortunately you cannot ssh without the tty on either iAPs or the controller, but you can consider to use curl to connect, deal with the cookies, and then use the same methods as the webUI for running CLI commands.

     

    * caveat * of course this is an unsupported method for accessing the device CLI, on one hand it is no different than a webUI but on the other hand there are no guarantees that the interface won't change in the future.

     

    example for IAP below

     

    regards

    -jeff

     

    root@bt:~# curl --insecure --cookie-jar .cookie --data "opcode=login&user=admin&passwd=admin&refresh=false" https://192.168.1.100:4343/swarm.cgi
    <?xml version='1.0'?><re><data name="sid" pn="true">d3zf5LdhSw8YHhZoFY4o</data><data name="type" pn="true">Admin</data></re>
    root@bt:~#
    
    the SID value (data name="sid" above) needs to be used in all subsequent https requests and it changes every session
    
    root@bt:~# curl --insecure --cookie .cookie --data "opcode=support&ip=192.168.1.5&cmd=%27show aps%27&refresh=false&sid=d3zf5LdhSw8YHhZoFY4o" https://192.168.1.100:4343/swarm.cgi
    
    1 Access Point
    --------------
    Name               IP Address    Mode    Spectrum  Clients  Type  Mesh Role  Zone  2.4 Channel  2.4 Power (dB)  2.4 Utilization (%)  2.4 Noise Floor (dBm)  5.0 Channel  5.0 Power (dB)  5.0 Utilization (%)  5.0 Noise Floor (dBm)  Need Antenna Config  From Port  Config Id  Config Csum  Ext SSID Active  Age
    ----               ----------    ----    --------  -------  ----  ---------  ----  -----------  --------------  -------------------  ---------------------  -----------  --------------  -------------------  ---------------------  -------------------  ---------  ---------  -----------  ---------------  ---
    18:64:72:c1:22:7e  192.168.1.5*  access  disable   3        115   Portal     -     6            20              14(good)             -95(good)              116+         24              1(good)              -93(good)              No                   none       0          7901         disable          2d:13h:41m:7sroot@bt:~# 
    root@bt:~# 
    
    where:  
    192.168.1.5 is the actual IP of the VC AP, you can remove this to run the command in VC, or, can put any other IP in there
    %27show aps%27 url encoded cli command, since the whole thing is surrounded by double quote, you need to keep the %27 on each side of the command you want to run
    d3zf5LdhSw8YHhZoFY4o is the SID from the login response

     

    if you want the result as XML, you can change the opcode to show, i.e.

    root@bt:~# curl --insecure --cookie .cookie --data "opcode=show&ip=192.168.1.5&cmd=%27show aps%27&refresh=false&sid=d3zf5LdhSw8YHhZoFY4o" https://192.168.1.100:4343/swarm.cgi


  • 3.  RE: Can I invoke Aruba Command without tty ?

    Posted Dec 16, 2014 03:52 AM

    Hi jeff-san,

    Thank you for replying.
    I'll try that method.

    Regards,

    Mitsu