De man nohup
(POSIX) :
If the standard output is a terminal, all output written by the named
utility to its standard output shall be appended to the end of the file
nohup.out in the current directory. ...
If the standard error is a terminal, all output written by the named
utility to its standard error shall be redirected to the same file
descriptor as the standard output.
Para enfatizar: Se a saída padrão é um terminal .
Com um ssh nohup echo foo
simples, a saída padrão não é um TTY, a menos que você diga ao SSH para criar um:
ssh -t localhost nohup echo foo
Em man ssh
:
-T Disable pseudo-tty allocation.
-t Force pseudo-tty allocation. This can be used to execute
arbitrary screen-based programs on a remote machine, which can be
very useful, e.g. when implementing menu services. Multiple -t
options force tty allocation, even if ssh has no local tty.
Veja também: