How to manage tunnels as background processes from a shell script?
This is technically not an answer to the question asked, but rather an answer to your problem as described.  The ssh command has two switches that may be useful to you:

ssh -f -N -L 3000:server1:5029 me@server2


tells ssh to hang around in the foreground just long enough to ask for any necessary passwords, and then put itself in the background, not executing any remote command but just handling the tunnel.

If you really want this to appear in a tab then you may want a different solution.