Why cant you take port and authentication string when application start and then use ssh port forwarding/bind directly? Will this not work for you?
-krd.
i am sorry i dont understand your question. what do u mean by authentication string and what application ?