How to enter SSH commands for Icons is a somewhat routine question we are asked here in Support, so I figured I'd put together a simple post regarding where to find the commands, and how to enter them. This post will not cover accessing the unit over SSH, only where to get the commands, and how to enter them.
In the rbsh> prompt, ignore the underscores "_" from the docs/json page when entering your SSH commands.
0 (zero) = disable(d)
1(one) = enable(d)
Use TAB to auto complete commands, and TAB TAB to print available commands.
First off, the Icon has two Shells;
1). The Ruby Shell represented by the "rbsh>" prompt is the initial prompt you reach when accessing the unit over SSH.
The commands for this shell can be found through your Icon itself, by appending docs/json to the end of the IP you use to access its web interface.
These commands are structured in groups, and these groups are listed like a table of contents at the top left of these page. Entering one of the sections will show you a list of commands that are available. For this post I will use SysAdmin as an example, and I will cover setting and checking your enabled SNMP versions.
The command to check your enabled versions is listed as "SysAdmin_getSNMPVersion", with an underscore, but the actual entry into your SSH terminal should be "SysAdmin getSNMPVersion", without the underscore. It is worth noting that all commands entered into the Ruby Shell start with their respective sections, GUI, SysAdmin, Conf and so on, and this is then followed by the command itself.
Here is an example of the get command that indicates that SNMP 2 and 3 are enabled on my device, and SNMP 1 disabled.
rbsh> SysAdmin getSNMPVersion
To change this, you would use the set command "SysAdmin setSNMPVersion(snmpv1, snmpv2c, snmpv3);" nad below is an example of how that would be entered. In this example I am leaving SNMP v1 disabled, SNMP v3 enabled, and I am disabling SNMP v2. Basically, 0 means disabled, and 1 means enabled.
rbsh> SysAdmin setSNMPVersion 0, 0, 1
2). The Automation Shell represented by a "$" prompt is a relatively easy and straight-forward prompt to work in, and is entered by typing "clish" into the "rbsh>" prompt.
Example: rbsh> clish
Once you enter this prompt though, you cannot get back to Ruby Shell without starting a new session.
The commands for this shell can be found through your Icon itself, by appending docs/clish to the end of the IP you use to access its web interface.
This is also an older command structure that has been around for all of our systems, so it has changed drastically over the years, and between systems, so the docs/clish page does not show everything. I'll attach a document to this post that covers the shell in more detail, but that document covers the shell for a non-Icon system. This means that some of the commands will not be structured for Icon systems, but it will show you more commands and some syntax examples that may be helpful. Keep in mind that not everything listed in the document will be available in the Icon, but it is a good supplementation document.