Management Software

Reply
New Contributor
Posts: 2
Registered: ‎10-17-2013

Cannot remotely execute alicreate command from UNIX (AIX7.1) brocade switch command using SSH

For the future scripting, tested remoute "alicreate" execution from LINUX to Brocade 5100 on FOS7.4.0a.

While localy it was OK, - looks like nothing was eceuted on the switch, while in the "clihistory' I can see the correct commands SSH sent to the switch.

 

My example:

 

#!/bin/bash

ssh admin@172.26.203.66 "alishow "UC*""

ssh admin@172.26.203.66 "alicreate "UCSTEST1_vHBA3","10:00:00:00:C9:72:53:B0""

ssh admin@172.26.203.66 "alishow "UC*""

ssh admin@172.26.203.66 "alidelete \"UCSTEST1_vHBA3"\"

ssh admin@172.26.203.66 "alishow "UC*""

ssh admin@172.26.203.66 " echo yes | cfgsave"

 

BTW... alishow  and cfgsave were executed "OK".

 

Any advices?

Thanks, Vladimir

 

Valued Contributor
Posts: 530
Registered: ‎03-20-2011

Re: Cannot remotely execute alicreate command from UNIX (AIX7.1) brocade switch command using SSH

Vladimir, I think the problem is with interpretation of quotes by the local and remote shells. Try doing it this way:
ssh admin@172.26.203.66 'alishow UC*'
ssh admin@172.26.203.66 'alicreate "UCSTEST1_vHBA3","10:00:00:00:C9:72:53:B0"'
ssh admin@172.26.203.66 'alishow "UC*"'
ssh admin@172.26.203.66 'alidelete "UCSTEST1_vHBA3"'
ssh admin@172.26.203.66 'alishow "UC*"'
ssh admin@172.26.203.66 'echo yes | cfgsave'
Valued Contributor
Posts: 530
Registered: ‎03-20-2011

Re: Cannot remotely execute alicreate command from UNIX (AIX7.1) brocade switch command using SSH

BTW, you don't always need double quotes (") in the Brocade shell. They are only required when you specify an object with multiple subobjects separated with ";" inside, e.g.
zonecreate zoneX,"aliY;aliZ"
- here the quotes are required. but
alicreate aliX,ww:nn:ww:nn:ww:nn:ww:nn
- will work witout quotes at all

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.