The SonicWall NSv command-line interface (CLI) lets administrators directly configure, monitor, and troubleshoot the firewall. The CLI is most useful during initial setup, recovery, and advanced administration.
Prerequisites
Before launching the NSv CLI using SSH, ensure the following:
Ensure that an SSH client is available on the system
Use VM console access when SSH is not enabled
To launch the NSv CLI using SSH
Launch the SSH client.
In the Host Name (or IP address) field, enter the public IP address of the NSv.
In the Port field, enter 22 if it is not already set.
Using an SSH port other than 22 can block access because SonicCoreX only listens on port 22, and NSv uses the same SSH entry point for both the SonicCoreX console and the SonicOS CLI. If you change the SSH port in SonicOS, SonicCoreX cannot use it, and you may lose access to both consoles.
For Connection type, ensure that SSH is selected. This option is selected automatically when you specify port 22.
Click Open.
At the login prompt, enter the SonicOS administrator credentials (default: admin/password).
The following table describe the CLI commands and their usage.
The command syntax, usage, and description can be displayed by typing the command in the SonicCoreX CLI console, followed by a space and a question mark (?).
| Command | Syntax | Description | Example |
|---|---|---|---|
| help | help | It shows the default help of the SonicCoreX with CLI console. | help |
| ping |
|
Runs the ping command on the mentioned IP address or String |
ping google.com OR ping ip google.com OR ping ip6 <ipv6 address> |
| restart | restart |
|
restart OR restart enter-safemode |
| safemode | safemode | Restarts the firewall in safemode. | safemode |
| show (normal mode) |
|
|
show system OR show sonicos OR show network OR show dns OR show logs |
| shutdown | shutdown | Shuts down the firewall. | shutdown |
| support-data | support-data | Sends logs to support. | support-data |
| update |
|
Checks, downloads, and installs an available update. |
update check OR update download OR update install |
| update-channel |
|
It is used to modify/read/restore the update channel to deliver updates. |
update-channel read OR update-channel set <channel name> OR update-channel restore |