Try to run the following commands from another server in the Layer7 cluster:
ssh ssgconfig@<ssg_server> /opt/SecureSpan/Gateway/runtime/bin/gateway.sh stop
ssh ssgconfig@<ssg_server> /opt/SecureSpan/Gateway/runtime/bin/gateway.sh start
Have added the following entries to /etc/sudoers.d/ssgconfig:
ssgconfig ALL = (layer7) NOPASSWD: /opt/SecureSpan/Gateway/runtime/bin/gateway.sh stop
ssgconfig ALL = (layer7) NOPASSWD: /opt/SecureSpan/Gateway/runtime/bin/gateway.sh start
But got the permission denied error when try to run the commands.
Linux server, gateway ssg server 11.x.
ssgconfig login profile will run the menu script first. A different id is needed to run remote login, also the script gateway.sh needs to run as user gateway (other scripts may not have such requirement).
Create a new user say: testuser on the remote server and added the following entry to /etc/sudoers.d/testuser
testuser ALL = (gateway) NOPASSWD: /opt/SecureSpan/Gateway/runtime/bin/gateway.sh stop
testuser ALL = (gateway) NOPASSWD: /opt/SecureSpan/Gateway/runtime/bin/gateway.sh start
Run command in the remote server:
ssh testuser@<ssg_server> su -u gateway /opt/SecureSpan/Gateway/runtime/bin/gateway.sh start