cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
715
Views
5
Helpful
3
Replies

Script to reboot AireOS APs

zhenningx
Level 4
Level 4

Hello, I am looking for a script to SSH into a list of AireOS APs and issue "reload" command. Anyone has any ideas?

Thanks.

3 Replies 3

Try netmiko - https://ktbyers.github.io/netmiko/docs/netmiko/cisco/cisco_wlc_ssh.html

import re
from netmiko import ConnectHandler

with ConnectHandler(
    ip = '[ip_address]',
    port = 22,
    username = '[us]',
    password = '[pass',
    device_type = 'cisco_wlc_ssh'
) as ch:

    output = ch.send_command("reload")

 

 

 

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thanks. I tried but cannot get into the enable mode of the AP. Note this is for Cisco AP, not WLC, the AP model 9105AXW specifically.

I added secret and enable codes:

import re
from netmiko import ConnectHandler

with ConnectHandler(
ip = 'x.x.x.x',
port = 22,
username = '',
password = '',
secret = '',
device_type = 'cisco_wlc_ssh'
) as ch:

ch.enable()

output = ch.send_command("reload")

When I run this, I got this error on the AP log:

sshd[17053]: error: Could not get shadow information for username.

Thanks.

Never seen that week before, I wonder if that driver is supporting for APs as well as as the WLC?

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io