Wireless Access

Occasional Contributor II

Script for CLI commands

Hi guys,

i saw a lot of topics but nothing gives me a clear answer.

I want to script a file which logged to the IAP and run several commands.

For example to disable the SSID.


I saw very old topics here but nothing helps me really.

Any hints?

Thanks a lot.

Aruba Employee

Re: Script for CLI commands

While not intended for this exact use case, you may be able to modify the commands in AirRecorder to do what you want.  It's a free tool on the support site.  The reason I say it's not intended to do this is when you run it, it runs a set of commands on the interval set in the config file for the tool.



Re: Script for CLI commands

I have an ugly script for some junipers where I send commands through SSH (this would be the only way since there is no API for this, please NOTE that it's very error prone).


I am using python and paramiko, I'll give you part of the code, maybe it will get you going.


import paramiko
import time
ip = 'insert_ip_here' username = 'insert_username_here' password = 'insert_password_here'
remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy( paramiko.AutoAddPolicy()) try: remote_conn_pre.connect(ip, username=username, password=password) except paramiko.AuthenticationException: print '{} authentication error'.format(ip) continue except socket.error, e: print '{} socket error'.format(ip) continue remote_conn = remote_conn_pre.invoke_shell() remote_conn.send("show system storage partition\n") time.sleep(10) output = remote_conn.recv(5000) remote_conn.close()

The response is stored in the output variable.


Aranya AB, Sweden
Occasional Contributor II

Re: Script for CLI commands

Thanks a lot.
I tested AirRecorder, but get enable handshake errors.

in macos and ubuntu as well.

no clue how to fix this.


my java version:
java version "11.0.2" 2019-01-15 LTS

Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)

Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

i get a lot of : Failed to connect: java.io.IOException: Enable handschake failed(1).

also with --disable-fast-login.


java -jar AirRecorder-1.5.5-release.jar -disable-fast-login 192.168.1.xx



any ideas?


Search Airheads
Showing results for 
Search instead for 
Did you mean: