How to automatically run commands after SSH and SUDO not working?

view story

http://www.unix.com – 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: 1. ssh sapsystem sudo -u sidadm "command1;command2" 2. ssh sapsystem sudo -u sidadm command 3. 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 assi (HowTos)