http://www.perlmonks.org?node_id=1008690


in reply to cygwin opensshd: how to detach remotely with fork/exec?

Since no one has answered you yet, I'll throw this out. To exec a program in the background with SSH2 on linux, we use this to close off the file numbers of the process being backgrounded. I think it is important to do that, just as if it were a daemon.
my $chan = $ssh2->channel(); $chan->blocking(1); $chan->exec("nohup /home/zentara/perlplay/net/zzsleep > foo.out 2> foo +.err < /dev/null &"); $chan->send_eof;
I know the SSH2 libs are not what you are using, but it might help for you to see a correctly setup nohup string.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh