We help IT Professionals succeed at work.

What is SOCKS and can we use SSH port forwarding to achieve it?

Balbir Singh
Balbir Singh used Ask the Experts™
I have been playing with SSH local and remote port forwarding and have a little understanding of it. I am wondering if it is same as SOCKS protocol and how using SSH dynamic port we can achieve it.

Also, I am wondering what is the use case of SOCKS when we have VPN and port forwarding.

Thanks in Advance
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
David FavorFractional CTO
Distinguished Expert 2018

Describe exactly what you're trying to accomplish.

This context will help shape answers.
nociSoftware Engineer
Distinguished Expert 2018

ssh port forwarding is protocol agnostic.  When ssh receives a connection request, it will pass this on to the system mentioned the linked settings.
And it will forward all data...  There is no communication about the connection between program & SSH.

Socks is a protocol where your program talks to the proxy to request several things on it's behalf.  So there is active communication between the proxy & the program about the connections.

This better explains Socks proxies and where they belong.

Socks does NOT encrypt, it can authenticate.
Software Engineer
Distinguished Expert 2018
After thought there is an option -D on the ssh command line that will allow ssh to act as a SOCKS 4 or 5 forwarder. (not that often used)

Check man ssh  for more info.