I was looking at this question while I was trying to find a good socks server for linux that would be easy to configure.
The following command works fine:
ssh -f -N -D 0.0.0.0:1080 localhost
I was wondering, though, if it is possible to have some kind of authentication required for the socks proxy to work - i.e. an existing unix user & correct password?
I don't think it is possible with OpenSSH. You will need to use a Socks5 proxy server like Dante.