Try Bitvise Tunnelier - it works for me. I set it to establish SSH tunnels while only being visible as a tray icon. It establishes the SSH connection on startup and re-establishes it as soon as connectivity is restored after a cut or after the system went to sleep. I still prefer the looks of the Putty console, so I keep using it - but for keeping tunnels up I now use Tunnelier. The only major downside I have found is the lack of IPv6 support, which Putty provides with no user action needed.
If you set the 'LogLevel' in the sshd_config configuration file to DEBUG1 (or any DEBUG level), then sshd will log the port numbers in /var/log/auth.log.
Do remember, that using a LogLevel of DEBUG or higher could be a privacy risk, since much is logged.
(from /var/log/auth.log, removed a few lines to show relevant information)
Jun 24 06:18:24 radon sshd[9334]: Connection from 192.168.13.10 port 39193
Jun 24 06:18:24 radon sshd[9334]: Accepted publickey for lornix from 192.168.13.10 port 39193 ssh2
Jun 24 06:18:24 radon sshd[9334]: pam_unix(sshd:session): session opened for user lornix by (uid=0)
Jun 24 06:18:24 radon sshd[9334]: User child is on pid 9339
Jun 24 06:18:24 radon sshd[9339]: debug1: Local forwarding listening on 0.0.0.0 port 0.
Jun 24 06:18:24 radon sshd[9339]: debug1: Allocated listen port 39813
Jun 24 06:18:24 radon sshd[9339]: debug1: channel 0: new [port listener]
Jun 24 06:18:24 radon sshd[9339]: debug1: Local forwarding listening on :: port 39813.
Jun 24 06:18:24 radon sshd[9339]: debug1: channel 1: new [port listener]
Jun 24 06:18:27 radon sshd[9339]: Received disconnect from 192.168.13.10: 11: disconnected by user
If you follow it through, you can see where you could parse the connection information, and then the forwarded port (39813 in this case)
I used this command line between two of my machines, I do have ssh-key login set up, so no password prompts or delays
-xenon- lornix:~> ssh -R "*:0:radon:22" -N -T radon
Allocated port 39813 for remote forward to radon:22
-N specifies no command is given, and -T stops allocation of a tty for this connection.
Another way to disseminate the port connection information would be to parse it from the client side and send an email, jabber, text msg, smoke signals or pigeon to carry the port # to whomever needs it.
Best Answer
If your installation of TightVNC was anything like mine, then the program TightVNC Service was also installed and is currently running in the background. TightVNC Service is a VNC server, which means your Windows 7 computer is running as a server when you want it to shut up and be a client!
All you need to do is look at your task bar for a little V icon and exit it. TightVNC Viewer can tell the difference between a real loopback and a SSH tunnel, so go ahead and try again after you've exited out of TightVNC Service. If it works, I would make sure TightVNC Service no longer runs on start-up.