I am having this interesting problem, where I would like to start this command
nc -l 8023 | zfs receive tank3/pro1
on a remote host 10.10.10.11
.
If I run
ssh -n 10.10.10.11 'nohup nc -l 8023 | zfs receive tank3/pro1 &'
from inside a script, then it doesn't continue in the script, because zfs
it is waiting for STDIN.
If I redirect STDIN, STDOUT, STDERR
ssh -n 10.10.10.11 'nohup nc -l 8023 | zfs receive tank3/pro1 &> /dev/null < /dev/null &'
then the script continues, but redirecting STDIN destroys the zfs
command.
Question
Can screen
be used to solve this?
Or other ideas?