I'm working on a script to SSH and SUDO as (sap user sidadm) then automatically run commands that the sidadm user can run such as R3trans -v
, tp
, etc..
I can SSH without password and SUDO..
but the commands don't run after I SSH and SUDO to the sidadm user...here is the commands that I've tried from the command line:
-
ssh sapsystem sudo -u sidadm "command1;command2"
-
ssh sapsystem sudo -u sidadm command
-
ssh sapsystem sudo -u sidadm 'command'
All have logged me in and sudo'ed, but
but the commands aren't automatically running
Prompt:
sapsystem>
Please assist? What am I missing?
I've even tried bash -c
too.,