2 ms·
-R now supports SOCKS5 too. Except you initiate it from the other side (compared to -D), which is pretty cool and gives the same practical effect.
by shmerl 4y ago
-R now supports SOCKS5 too. Except you initiate it from the other side (compared to -D), which is pretty cool and gives the same practical effect.
- lucb1e 4y agoHow 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?
- shmerl 4y agoIf I understand correctly, something like this: 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.
- singlow 4y agoIf you don't specify a destination for -R it will work in SOCKS mode. > ssh -R 8080:localhost:8080 #Port forward vs > ssh -R 8080 #SOCKS