establish reverse ssh from yun to remote server

I have this command line to establish a reverse ssh connection to my remote server.

ssh -R 20022:127.0.0.1:22 -R 20080:127.0.0.1:80 xxx@xxx.xxxddns.com -o ServerAliveInterval=30 -o ServerAliveCountMax=6 -i /root/.ssh/id_rsa.db

It is working properly using the terminal, but i want to use the Process.runShellCommand() for this and I can't make it work. Unable to establish the connection without any error.

You have to run a command to hold the connection open. Try adding "ping www.google.com" or something similar at the end. ssh works differently if called in a TTY or in scripts.