Emulating ssh's -D option, if TCP forwarding is disabled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LH ist the local host, RH is a remote host with SSH daemon running.

Start that on LH:

socat TCP4-LISTEN:45600,reuseaddr,fork EXEC:'ssh -e none REMOTEHOST delegated -f SERVER=socks4'

Then LH becomes a SOCKS4 server through the SSH tunnel, even if TCP
forwarding is disabled.

This solution needs _socat_ <http://www.dest-unreach.org/socat/> on LH
and _delegated_ <http://www.delegate.org/delegate/> on RH.

Socat fits better than Netcat, because the latter would only provide a
one shot server.

Starting _ssh_ for every new server connection is not necessarily as
ineffective as it sounds to be. Just make them slave connections by
configuring in ~/.ssh/config:

 Host RH
 ControlMaster auto
 ControlPath ~/.ssh/controls/%r@%h:%p