redirecting phindow request to another socket connection?

Here is what i am trying to achieve.
I have a QNX box (client) in network where I have no way of knowing it’s IP address (even if I do, it is internal IP). I want to phindow to this QNX box from another network over the internet. My quick thought was to try doing this.

  1. Write a client/server software so that the client can connect to a known QNX server (has public IP).
  2. Now this QNX server has a socket connection with this client.
  3. Phindow into this QNX server, then at this point the QNX server will not execute phrelay but inetd will just redirects this request to the socket connection made with client, so that I am able to phindow into the client.

Is this even possible??? Any suggestion on how to get this done would make my dayï

What you want to do, is certainly possible. As long as you have access to both QNX machine.
Also, not sure if you need to worry about security or not.

On the other hand, you can just install ssh/sshd on both QNX machine, which provide
this kind of tunneling. Plus the data is encrypted.

I am not too familiar how you can do this with ssh/sshd? Can you explain in more detail?
Also, I am only allow to use port 80 to go through the firewalled network.

Also can you give me an idea how I can perform my step 3? How to tell inetd to redirect phindow request to another socket connection?
"Phindow into this QNX server, then at this point the QNX server will not execute phrelay but inetd will just redirects this request to the socket connection made with client, so that I am able to phindow into the client. "

thanks