Otto  background

Linux Hack of the Week #17: Using SSH as a Proxy

Connect With Us

Start now, and patch, configure, and control all your endpoints in just 15 minutes.

When I travel and have to use public WiFi networks I make sure to encrypt all of my traffic. There are a number of paid VPN services that can be utilized, but there is also a way to accomplish the same security for free by accessing an SSH server.

OpenSSH has built-in support to work as a SOCKS proxy server. As most people know, most Unix and Linux systems include the ssh command. One addition to the ssh command will have you sending your data through an encrypted tunnel.

Set up the proxy

Setting up the proxy is simple: ssh to your client with the additional options -D PORT -C. The flag -D is used to start the SOCKS proxy, and port is any above 1024. The option -C tells it to compress the data.

ssh joe@example.com -D 1984 -C

 

Client configuration

Depending on which OS and browser you are using, configuration settings will most likely be found under network, or in the browser under network settings. The most important detail is entering the localhost and the same port used above.

Confirm

In your browser search for “what is my IP”. This should show the IP of the host you have ‘SSH’d’ to. Now all of your traffic is encrypted and running through the SSH tunnel.

SSH as a proxy takeaway

I hope this post helps those looking to safely bypass a firewall or encrypt data while using a less-than-trustworthy network. 


Automox for Easy IT Operations

Automox is the cloud-native IT operations platform for modern organizations. It makes it easy to keep every endpoint automatically configured, patched, and secured – anywhere in the world. With the push of a button, IT admins can fix critical vulnerabilities faster, slash cost and complexity, and win back hours in their day. 

Grab your free trial of Automox and join thousands of companies transforming IT operations into a strategic business driver.