PuTTY seems to have some serious issues with SSH port forwarding. http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/portfwd-corrupt.html seems to document exactly the same issues I've been having.
I was doing a simple read of XML data in Java from a remote HTTP server, using a SSH tunnel created by PuTTY.
Commonly but sporadically, the
HttpURLConnection appeared to close prematurely, resulting in only partially-received content.
Switching between "dynamic" and "static" (Local) tunnel destinations did not have any effect.
I've also been having issues with PuTTY crashing on unclean closes.
The latest development snapshot (2009-05-27:r8577) does not appear to help. The "portfwd-corrupt" bug was filed in mid-2003, and there hasn't been a new release in over 2 years. (0.60 was released on 2007-04-29.) All of the PuTTY forks and variations I tried have the same issue. (See PuTTY on Wikipedia.) TeraTerm (Wikipedia) does not suffer the same issue, but does not appear to support dynamic tunneling using SOCKS.
My working solution: Use OpenSSH (Wikipedia), which also works on Windows through the use of Cygwin (Wikipedia).
Just be aware that this is a command-line solution.
While there are probably various front-ends available, I'd be surprised if there was one that didn't limit the available options that
ssh has to offer.
Ironically, I am using PuTTYcyg to run
ssh, as it is much better than the Windows' command prompt.
ssh with the desired arguments as the command instead of the default "
-" for the login shell, it saves a
bash process from running.