This article describes how to run the shell (FreeBSD) commands on the NetScaler appliance from a remote computer by using a secure shell (SSH) utility.
Citrix NetScaler software release 6 or later installed on the NetScaler appliance
After the shell prompt appears, run the required shell command(s). However, sometimes, it is desirable to run these commands without actually logging on to the NetScaler appliance, or to automate the running of the shell commands from a remote computer.
One method to accomplish this is to use scripts, such as shell, expect, or Perl scripts, running on the remote server and/or on the NetScaler appliance. Creating a script is out of the scope of this document.To run the shell command on a NetScaler appliance from a remote computer, complete the following procedure:
From the remote computer, run the following command:
ssh user@NSIP 'shell <Shell_Command>'The following is an example of the command and its output when run from a remote computer:
user@mgmnt# ssh nsroot@NSIP 'shell date'Note: The single-quote characters in the preceding command are required and cannot be substituted for back-ticks. However, you can replace these with double-quotes.
You can also redirect the output of the SSH command to the local applications for processing. In the following example, the grep command is run from the local shell prompt and not from the NetScaler shell prompt:user@mgmnt# ssh nsroot@NSIP 'shell sysctl -a' | grep netscaler
debug.netscaler_panic:
netscaler.developer: 0
netscaler.recovery: 0
netscaler.sysid: 940030
netscaler.serial: 3f549e6f4cc9f6664ea8
netscaler.descr: 7000 v1 6*EZ+2*EM
netscaler.pitbossexitcode: -559039810
user@mgmnt #ssh nsroot@NSIP 'shell “nsapimgr -d allarp ; nsapimgr -d allbridge”'
The following screen shot displays the APR entries in the first part of the output:
Note: You can also connect to a SNIP with Management Access enabled