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
.



Relevant Pages

  • SSH connection stays open while the remote command has finished
    ... When running a command remotely using ssh, ... sometimes the SSH connection itself remains open. ... launch anything in the background and does not take any interaction (it is ... PID 5975 is the SSH daemon instance that ran the script. ...
    (SunManagers)
  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
    (comp.lang.tcl)
  • Re: OT: Hard disk mirror with Paragon on USB stick?
    ... at least two pages of intricate command line stuff. ... The password is only used when you want to backup to a remote machine ... via the network, using the ssh protocol. ... (e.g. with linux, ...
    (sci.electronics.design)
  • RE: midnight commander and ssh sftp
    ... midnight commander and ssh sftp ... which is displayed at the bottom of the MC panel. ... "Left file command options right" at the top of the MC ... MC SSH session with the remote host by hitting F10 key. ...
    (freebsd-questions)
  • Re: sshd and ftpd
    ... ssh keys, so when you log in it doesn't ask for one. ... we want to be able to connect to our remote host without ... If you used the defaults supplied by the ssh-keygen command, ...
    (Ubuntu)

Quantcast