I need help trying to execute a script remotely using ssh.
I'm writing a script that will run on a local machine. From that script I need to execute a script on a remote machine. The problem is that when I run the remote script using ssh, it's output is shown as if it were running locally. I need the script to run commands on the remote machine, not the local one. This is what I am doing:
ssh root@remoteServer /var/spool/asterisk/voicemail/default/script
That remote script needs to execute commands on files relative to its location on the remote machine. Maybe ssh isn't the best method to invoke this. Any help would be appreciated.