<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can changing the PSK on a wireless controller be scripted? in Wireless</title>
    <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3788198#M26717</link>
    <description>There is also another way, requiring a RADIUS server, but could also maybe (ab)used for your requirement:&lt;BR /&gt;&lt;A href="https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/8-5/b_Identity_PSK_Feature_Deployment_Guide.html" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/8-5/b_Identity_PSK_Feature_Deployment_Guide.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But honestly, it's easier with SNMP or SSH. &lt;BR /&gt;For SSH, try to send an empty username at first try, then the console should start and ask for the username, where you send the correct one. That would probably require a timed character sequence.</description>
    <pubDate>Fri, 25 Jan 2019 15:51:31 GMT</pubDate>
    <dc:creator>patoberli</dc:creator>
    <dc:date>2019-01-25T15:51:31Z</dc:date>
    <item>
      <title>Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785392#M26712</link>
      <description>&lt;P&gt;Any suggestions for how to automate a monthly change to the PSK for the guest wireless ssid.&amp;nbsp; Attempts to connect to the wireless controllers in Powershell with poshssh and plink run into issues trying to authenticate. The first prompt at login being "login as" rather then user as is the case with most ssh connections.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 16:44:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785392#M26712</guid>
      <dc:creator>PJV</dc:creator>
      <dc:date>2021-07-05T16:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785395#M26713</link>
      <description>&lt;P&gt;Hello, have you tried using Ansible with the aireos_config and aireos_command modules?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 19:13:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785395#M26713</guid>
      <dc:creator>jcohoe</dc:creator>
      <dc:date>2019-01-22T19:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785430#M26714</link>
      <description>&lt;P&gt;I have not tried Ansible. Can you point me to an example using Ansible?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 19:55:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785430#M26714</guid>
      <dc:creator>PJV</dc:creator>
      <dc:date>2019-01-22T19:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785520#M26715</link>
      <description>&lt;P&gt;Hi, we are planning to release a blog post in March, to coincide with the Ansible release. Their release has a fix for both "legacy" and the new SSH mechanisms within AireOS. As you may be aware, in AireOS 8.6+ the CLI wrapper around the authentication is disabled by default, providing a more native SSH experience. Prior to 8.6 there is a wrapper around the authentication, which is where your powershell etc scripts are likely failing.&lt;/P&gt;
&lt;P&gt;To work around this, you could try upgrading to 8.6+ code (recommend 8.8). However I understand this is much easier said that done &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a video showing this in action:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=KIJBE9DVMDA" target="_blank"&gt;https://www.youtube.com/watch?v=KIJBE9DVMDA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the config for Ansible&lt;/P&gt;
&lt;P&gt;aireos_hosts.txt&lt;/P&gt;
&lt;PRE&gt;[all:vars]
ansible_connection=local
ansible_user=your_wlc_username
ansible_password=your_wlc_password
ansible_port=22
[aireoswlc]
wlc1 ansible_host=10.10.10.2&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;aireos_show.yaml&lt;/P&gt;
&lt;PRE&gt;---
- hosts: aireoswlc
  gather_facts: no
  tasks:
   - aireos_command:
      commands:
       - show boot
     register: show
   - debug: var=show.stdout_lines&lt;/PRE&gt;
&lt;P&gt;Execute the playbook with:&lt;/P&gt;
&lt;PRE&gt;ansible-playbook -i ./aireos_hosts.txt ./aireos_show.yaml

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Documentation on the 2 modules are available at:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.ansible.com/ansible/2.4/aireos_command_module.html" target="_blank"&gt;https://docs.ansible.com/ansible/2.4/aireos_command_module.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.ansible.com/ansible/2.4/aireos_config_module.html" target="_blank"&gt;https://docs.ansible.com/ansible/2.4/aireos_config_module.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 22:53:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785520#M26715</guid>
      <dc:creator>jcohoe</dc:creator>
      <dc:date>2019-01-22T22:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785878#M26716</link>
      <description>&lt;P&gt;&lt;A href="https://www.google.com.au/search?client=opera&amp;amp;q=python+random+string+generator&amp;amp;sourceid=opera&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8" target="_self"&gt;Python scripts&lt;/A&gt;&amp;nbsp;are available that will generate random characters.&amp;nbsp; Add a few lines to instruct the system to remote into the WLC to change the PSK (alternatively, can use SNMP to push the new PSK) and at the same time email you the new PSK.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Use crontab to schedule how often you want the script to run.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 08:56:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3785878#M26716</guid>
      <dc:creator>Leo Laohoo</dc:creator>
      <dc:date>2019-01-23T08:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3788198#M26717</link>
      <description>There is also another way, requiring a RADIUS server, but could also maybe (ab)used for your requirement:&lt;BR /&gt;&lt;A href="https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/8-5/b_Identity_PSK_Feature_Deployment_Guide.html" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/8-5/b_Identity_PSK_Feature_Deployment_Guide.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But honestly, it's easier with SNMP or SSH. &lt;BR /&gt;For SSH, try to send an empty username at first try, then the console should start and ask for the username, where you send the correct one. That would probably require a timed character sequence.</description>
      <pubDate>Fri, 25 Jan 2019 15:51:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3788198#M26717</guid>
      <dc:creator>patoberli</dc:creator>
      <dc:date>2019-01-25T15:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3790626#M26718</link>
      <description>&lt;P&gt;Thank you for all the responses. Our device is a Cisco 5508 WLC . The latest version I can find is 8.5 . Can anyone confirm that this supports the new cli wrapper ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 17:55:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3790626#M26718</guid>
      <dc:creator>PJV</dc:creator>
      <dc:date>2019-01-29T17:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3790715#M26719</link>
      <description>&lt;P&gt;Yes the latest supported code for 5508 is 8.5. The Ansible modules now work with both legacy and current SSH implementation.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 21:07:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/3790715#M26719</guid>
      <dc:creator>jcohoe</dc:creator>
      <dc:date>2019-01-29T21:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/4523204#M236714</link>
      <description>&lt;P&gt;I tried the same script on Ansible Tower but could not get the response and got the error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the error message for your reference. Please suggest.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 14:31:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/4523204#M236714</guid>
      <dc:creator>khan.mohd.sharif1</dc:creator>
      <dc:date>2021-12-23T14:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can changing the PSK on a wireless controller be scripted?</title>
      <link>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/4863049#M257487</link>
      <description>&lt;P&gt;Have used posh-ssh module for PowerShell for automation with New-SSHShellStream commandlet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ssh = New-SSHSession -ComputerName $IP -Credential (New-Object System.Management.Automation.PSCredential ($Username, (ConvertTo-SecureString -String $Password -AsPlainText -Force)))
$stream = New-SSHShellStream -SessionId $ssh.SessionId
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("$($Username)")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("$($Password)")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("config wlan disable &amp;lt;YOUR_WLAN_ID&amp;gt;")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("config wlan security wpa &amp;lt;YOUR_OPTIONS_FOR_PSK&amp;gt;")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("config wlan enable &amp;lt;YOUR_WLAN_ID&amp;gt;")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("save config")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("y")
Start-Sleep -Seconds 2
$stream.read()
$stream.WriteLine("logout")
Start-Sleep -Seconds 2
$stream.read()
$stream.Close()
Remove-SSHSession -SessionId $ssh.SessionId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Username - variable with your login, $Password - variable with your login password, $IP - variable with remote controller IP&lt;BR /&gt;$stream.read - used for getting shell output back for logging&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 08:51:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/wireless/can-changing-the-psk-on-a-wireless-controller-be-scripted/m-p/4863049#M257487</guid>
      <dc:creator>Ercuru</dc:creator>
      <dc:date>2023-06-27T08:51:37Z</dc:date>
    </item>
  </channel>
</rss>

