Socks

Updated: 10 January 2025

Socks tunnel

# -D: Tells SSH that we want a SOCKS tunnel on the specified port number
# -f: Forks the process to the background
# -C: Compresses the data before sending it
# -q: Uses quiet mode
# -N: Tells SSH that no command will be sent once the tunnel is up

ssh -D 8123 -f -C -q -N user@example.com

Verify that the tunnel is up and running

ps aux | grep ssh

If using -f, close the tunnel when finished

kill <process id>