I connect to a remote ssh server by running this command:
ssh -D 12345 [email protected]
This creates a socks proxy that I can use with Firefox to bypass censorship in my country. However, I can't take advantage of it to in the command line.
Let's say my country blocks access to youtube. How can I use the ssh connection to run a command such as:
youtube-dl "youtube.com/watch?v=3XjwiV-6_CA"
Without being blocked by the government? How I can set a socks proxy for all terminal commands?
tsocks youtube-dl ...
- tsocks is a clever application, commonly available in repositories, that usesLD_PRELOAD
to force applications to route their traffic through a designated SOCKS connection (specify which in~/.tsocks.conf
).