ssh -D some-port-number remote-server-url
.socks5://localhost:that-port-number-metioned-above
).So how are these concepts -- SOCKS5 proxying
, ssh tunneling
, reverse ssh tunneling
related with each other?
What you describe is a SOCKS proxy. It is standalone protocol used by various tools. What openssh
does it to tunnel this protocol encrypted from one point to the other. But more precisely, it is called TCP port forwarding (it forwards one port from client through the secure tunnel to the server).
There are other possibilities to use TCP port forwarding in openssh
using -L
and -R
switches that are correctly named Local ("brings" remote service to local host) and Remote (makes local service accessible from remote host).
As you can see, there are similarities, but they are implemented in different way. All of them are TCP port forwarding (through secure tunnel). The Dynamic (-D
) special, because the server have to understand the SOCKS protocol.