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.
in reply to cygwin opensshd: how to detach remotely with fork/exec?
I know the SSH2 libs are not what you are using, but it might help for you to see a correctly setup nohup string.
my $chan = $ssh2->channel();
$chan->exec("nohup /home/zentara/perlplay/net/zzsleep > foo.out 2> foo
+.err < /dev/null &");