От 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.
Подчеркнем: Если стандартный вывод - это терминал .
С помощью простого ssh nohup echo foo
стандартный вывод не будет TTY, если вы не скажете SSH создать его:
ssh -t localhost nohup echo foo
From 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.
Также см. :