I have a script on remote Debian server machine and I want to run a command by invoking:
ssh server "find.sh"
My find.sh script is in in:
/home/user/bin
First of all, I ran ssh server "echo $PATH" and it responded with this path:
/home/user/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
So it seems that PATH variable is ok but it doesn't work. Only way I could make it work was by invoking full path:
ssh server "/home/user/bin/find.sh"
Is there any simple way to make it work without specifying full path?