You are of course calling your
ssh() function I guess. Have you tried with
ssh_cmd() rather than
sshopen2() to see if that works? Also, do you know for sure the script on the remote server has or has not been run? I'd start with something like
"/usr/bin/echo test" just to see how far things get in the first place.
Makeshifts last the longest.