02-08-2023 06:46 AM
Hello, I am looking for a script to SSH into a list of AireOS APs and issue "reload" command. Anyone has any ideas?
Thanks.
02-08-2023 11:10 PM
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")
02-10-2023 11:04 AM
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.
02-10-2023 12:19 PM
Never seen that week before, I wonder if that driver is supporting for APs as well as as the WLC?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide