{"id":3683,"date":"2021-02-15T19:39:11","date_gmt":"2021-02-15T17:39:11","guid":{"rendered":"https:\/\/blog.3kgroup.ee:443\/?p=3683"},"modified":"2021-02-15T19:39:12","modified_gmt":"2021-02-15T17:39:12","slug":"smartzone-ap-remote-cli-and-scripting","status":"publish","type":"post","link":"https:\/\/blog.3kgroup.ee:443\/?p=3683&lang=en","title":{"rendered":"SmartZone AP remote-cli and scripting."},"content":{"rendered":"\n<p>There's a very useful function in SmartZone - you can ssh to any connected and online AP from SmartZone cli.<\/p>\n\n\n\n<p><strong>Example: executing one command:<\/strong><\/p>\n\n\n\n<p>Go to SmartZone cli through ssh, go to admin mode with 'ena' and give a command in following way:<\/p>\n\n\n\n<p><code> remote ap-cli c8:03:f5:0E:06:c0 \"get scg ip\" <\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>------ SCG Information ------\n SCG Service is enabled.\n AP is managed by SCG.\n State: RUN_STATE\n Server List: 10.0.12.140,194.204.45.210\n SSH tunnel connected to 194.204.45.210\n Failover List: Not found\n Failover Max Retry: 2\n DHCP Opt43 Code: 6\n Server List from DHCP (Opt43\/Opt52): Not found\n SCG default URL: RuckusController\n SCG config|heartbeat intervals: 30|30\n SCG gwloss|serverloss timeouts: 7200|36000<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>OK<\/code><\/pre>\n\n\n\n<p>This shows the command is executed in AP and the result is sent to SmartZone cli.<\/p>\n\n\n\n<p> <strong>Example: executing several commands:<\/strong> <\/p>\n\n\n\n<p> <code>remote ap-cli C8:03:F5:0E:06:C0 \"ping  192.168.108.142 ; ping 192.168.108.14\" <\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AP scripting.<\/h2>\n\n\n\n<p>A sciprt can be executed at once in many AP's and it's done from SmartZone WebGUI. Go to  <strong>Diagnostics->Scripts->AP CLI Scripts. <\/strong>This function allows to execute a script on one domain with possibility to time it on a convenient moment.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"541\" src=\"https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328-1024x541.png\" alt=\"\" class=\"wp-image-3685\" srcset=\"https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328-1024x541.png 1024w, https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328-300x159.png 300w, https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328-768x406.png 768w, https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328-600x317.png 600w, https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_328.png 1059w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Script can limit the commands to specific AP models or specify other limitations:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"406\" height=\"371\" src=\"https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_329.png\" alt=\"\" class=\"wp-image-3686\" srcset=\"https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_329.png 406w, https:\/\/blog.3kgroup.ee:443\/wp-content\/uploads\/2021\/01\/Selection_329-300x274.png 300w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/figure>\n\n\n\n<p>Take notice, that there's a default blacklist of commands you are not allowed to use in a script to prevent the more riskier actions of changing controller ip for example.<\/p>\n\n\n\n<p>Since SmartZone 5.1 the following commands are not allowed in scripts:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>reboot<\/li><li>set factory<\/li><li>set scg reset<\/li><li>set scg init<\/li><li>set scg ip<\/li><li>set scg disable\/enable<\/li><li>set hub disable\/enable<\/li><li>set interface<\/li><li>set password<\/li><li>set login<\/li><\/ul>\n\n\n\n<p>In case of still needing those commands, please contact Ruckus support to help you with special privileges.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There's a very useful function in SmartZone - you can ssh to any connected and online AP from SmartZone cli. Example: executing one command: Go to SmartZone cli through ssh, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":3671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[442],"tags":[580,283,798,275],"class_list":["post-3683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3k-support-services","tag-ap-en","tag-ruckus-en","tag-script","tag-smartzone-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/posts\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3683"}],"version-history":[{"count":2,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/posts\/3683\/revisions"}],"predecessor-version":[{"id":3688,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/posts\/3683\/revisions\/3688"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=\/wp\/v2\/media\/3671"}],"wp:attachment":[{"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.3kgroup.ee:443\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}