1

I have been trying to execute some NetScaler commands like "bind" & "unbind" through a Linux Box via an SSH Connection. Now the Problem is, Manually we are able to enter & execute commands on NetScalar, but through SSH we are not. Netscaler is a hardware device (or network appliance) manufactured by Citrix, which primary role is to provide Level 4 Load Balancing. It also supports Firewall, proxy and VPN functions.

if we log on to the Machine (in which NetScaler is configured), through a connection manager(Putty) we get a different prompt other than the shell. & Here we need to execute the commands like ...

unbind lb vserver VS_Netbanking_443_26 -policyName manual_checkSession

&

bind lb vserver VS_Netbanking_443_26 -policyname manual_checkSession -priority 155

which we are able to execute, But when we try to execute the same through script (as given below), we are not able to.

./rem_expect_con.sh $SERVER $PASSWORD `unbind lb vserver VS_Netbanking_443_26 -policyName manual_checkSession `

&

./rem_expect_con.sh $SERVER $PASSWORD `bind lb vserver VS_Netbanking_443_26 -policyname manual_checkSession -priority 155 `

Above "rem_expect_con" is a script built for Password less connection.

i have tried giving above arguments as

./rem_expect_con.sh $SERVER $PASSWORD 'bind lb vserver VS_Netbanking_443_26 -policyname manual_checkSession -priority 155'

./rem_expect_con.sh $SERVER $PASSWORD "bind lb vserver VS_Netbanking_443_26 -policyname manual_checkSession -priority 155"

`./rem_expect_con.sh $SERVER $PASSWORD "bind lb vserver VS_Netbanking_443_26 -policyname manual_checkSession -priority 155" `

But none of them are working. None of them are executing on the Netscaler. Please help.

1

You might find this useful:

How to Run the NetScaler Shell Commands from a Remote Computer

Additionally, you can run multiple commands separated by a semi colon and enclosed in double quotes. The following is an example of running commands to display ARP and Bridge table entries on the NetScaler appliance: user@mgmnt #ssh nsroot@netscaler 'shell “nsapimgr -d allarp ; nsapimgr -d allbridge”'

I have tested this on NS10.0: Build 78.6.nc. My experience differed from the Citrix article, however. I ended up having to use this format: user@netscaler 'showlb vserver test'

Since you didn't post the actual error, my guess is that your script is the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.