Starting script using ssh keeping nohup output on remote?
Hi,
I am trying to launch a command through ssh.
I use something like
ssh -i user@host 'export REMOTE=myname; nice nohup ./my-restart'
The problem is that the output appears on the local server where I ran
this command and not on the remote machine.
If I run the command "nice nohup ./my-restart &" on the remote machine
directly then the nohup.out file is created and the output appears
there. This is what I want.
Also I find that if I put a & into the ssh command above then the
command doesn't work.
Any Ideas? If this isn't the best place to post this then please
advise as to the best spot.
Thank you,
Fu-Tung
Re: Starting script using ssh keeping nohup output on remote?
Fu wrote:[color=blue]
> Hi,
>
> I am trying to launch a command through ssh.
>
> I use something like
>
> ssh -i user@host 'export REMOTE=myname; nice nohup ./my-restart'
>
> The problem is that the output appears on the local server where I ran
> this command and not on the remote machine.
>
> If I run the command "nice nohup ./my-restart &" on the remote machine
> directly then the nohup.out file is created and the output appears
> there. This is what I want.
>
> Also I find that if I put a & into the ssh command above then the
> command doesn't work.
>
> Any Ideas? If this isn't the best place to post this then please
> advise as to the best spot.
>
> Thank you,
>
> Fu-Tung[/color]
ssh user@host 'export REMOTE=myname; nice nohup ./my-restart >
logfile.log 2>&1 &'
Re: Starting script using ssh keeping nohup output on remote?
Perfect! Thank you Chuck!!!!!
Fu-Tung
[color=blue]
>
> ssh user@host 'export REMOTE=myname; nice nohup ./my-restart >
> logfile.log 2>&1 &'- Hide quoted text -
>
> - Show quoted text -[/color]