[CentOS] remote command execution

Tue Mar 18 22:30:46 UTC 2008
mouss <mouss at netoyen.net>

Joseph L. Casale wrote:
>> put everything in a shell script, and run the script.
>>     
>
> Yea, I tried that but neglected to see how it behaved from inside an ssh session. It works there but with plink :(
> Back to the drawing board...

I just tried:

% cat /tmp/test.sh
nohup /usr/bin/tail -f /tmp/test.in > /tmp/test.out 2>&1 &

(note that all output is redirected)

C:\> plink user at host /tmp/test.sh
...
C:\>

on the remote host
% echo "10" >> /tmp/test.in
% cat /tmp/test.out
...
10
% ps ax|grep tail
...  /usr/bin/tail -f /tmp/test.in