Unable to automate SSH in Script

Hi

I have a script at Server B. I want to run it from server A via another script. I tried the following command. ssh mss@247.123.456.123 "sh pm10.sh"

It's getting login automatically, but while running the script through error like "reppar: command not found" where reppar is an application installed in the remote machine. I am able to run the same script via manual ssh. But unable to do via script. Please help

It might be missing from the PATH, running it directly may prevent it doing an actual shell login and getting your usual shell variabies. something like ssh username@host . /etc/profile ';' mycommand could rectify that

Hi Corona688

yes, but it's not a single command. A set of commands inside the script. Can you please set me know how to update the PATH variable of remote machine?

Please try in the below format.

or even u can export the path

Thanks a lot. It works.....

---------- Post updated at 11:02 AM ---------- Previous update was at 11:01 AM ----------

Thanks a lot. It works...