What you say is correct, but the OP is wanting to use the remote sshd as a socks proxy rather than tunneling to a listening application/server.
Your command looks correct to me. (As an aside, you might wish to try the -f option like jiml8 showed, but that is not your real problem.) I believe it is the sshd on the other end that actually acts as the proxy. So it must be capable of doing this. (I believe SSH daemons that are at all recent should have this capability, but maybe there is a compile time option?) I couldn't find any config file options for this. So the only thing I know to do is use a packet sniffer (tcpdump, wireshark, etc.) to monitor packets. Check the lo interface(on tcp/9999) on the originating machine and the Internet facing interface on the remote machine to see what packets are being sent and received. And you can use netstat to make sure that ssh actually is listening on tcp/9999 on your local machine.
NOTE: I've use the-D option for socks proxy on my LAN but I have never used it to actually go out to the Internet. So there may be some subtlety I am missing. Hmmm. Such as DNS? But I have read of people doing what you are trying.
Last edited by blackhole54; 08-19-2008 at 05:01 AM.