How does that work? Does it try to autodetect whether you're speaking SOCKS to it? What if you want to reverse tunnel a socks proxy from another process like Tor?
Let's say you have hosts A and B.
Doing this from A:
ssh -R 1080 B
will start a SOCKS5 proxy on A, to which you can connect on B through port 1080 that's being forwarded there. So your web client running on B will use traffic proxied through A while connecting to 1080 on localhost.> Does it try to autodetect whether you're speaking SOCKS to it
I think it just uses SOCKS5 out of the box if you don't specify the host for -R. According to the man page for -R:
if no explicit destination was specified, ssh will act
as a SOCKS 4/5 proxy and forward connections to the
destinations requested by the remote SOCKS client.> ssh -R 8080:localhost:8080 #Port forward
vs
> ssh -R 8080 #SOCKS