set timeout 20
set ip [lindex $argv 0]
spawn ssh admin@$ip
send -- "ThePassword-here\r"
send -- "show clients | inc b8:27:eb:01:3a:ff\r"
send -- "disconnect-user mac b8:27:eb:01:3a:ff\r"
send -- "\r"
send -- "exit"
Note that scripting over SSH is not really recommended as the CLI commands or command output may change over time. Sometimes it is just a pragmatic and quick, so from that points valid approach to fix an immediate issue.
At Aruba, we believe that the most dynamic customer experiences happen at the Edge. Our mission is to deliver innovative solutions that harness data at the Edge to drive powerful business outcomes.
© Copyright 2021 Hewlett Packard Enterprise Development LPAll Rights Reserved.