Hi,
I would like to execute a program via ssh without login
I have the program in the home folder like this: /my/myprogram
Then I try to execute it
[font=Courier]ssh (name)@(host) -p 2222 “myprogram”[/font]
and always says “command not found”
even I have tried to put the PATH in .bashrc, .bash_profile like this:
[font=Courier]PATH=$PATH:$HOME/my
export PATH[/font]
Always that I tried this is the same output:
[font=Courier]ssh (name)@(host) -p 2222 "echo $PATH"
Outputs:
/usr/bin:/bin:/usr/sbin:/sbin[/font]
PS. Also tried to define PATH in .ssh\environment but didn’t work
Any solutions?