
This means that the SSH process is up and running. You should see a line in the output, something like this: user 14609 1 0 23:32 ? 00:00:00 ssh -CfNq -D 9999 When we’re done setting up the tunnel above, verify that the tunnel is up and running with this command: ps -ef | grep ssh It’s normal to see no indication of success or failure (because we applied the -q option.) Step 2: Verify the tunnel Once you enter the command above, you'll be brought back to the terminal. Replace with your remote sudo user and server IP address or domain name.

The port can be any user/registered ports or dynamic/private ports which range between 1024-65535. This works by allocating a socket to listen to port on the local side and optionally bound to specified bind_address.

I also assume that you already have the SSH key on your local machine. In this case we're using FireFox web browser.īefore we go through this, I recommend you to have an SSH key (for password-less authentication and security reasons).

An application that supports SOCKS proxy.(sign up with my referal link and get 50$ DigitalOcean credit!) It tunnels all your web traffic through the remote machine. Why use SSH tunneling?Īs I said above, it can be used to secure yourself when browsing from potential Man-In-The-Middle attacks, firewalls evasion and securing traffic tunneling. To make all comparison between VPN and SOCKS5 proxy is a large topic, maybe we can cover this later. If all you need to secure is your web browsing, SOCKS5 proxy tunnel is a simple alternative. SOCKS5 proxy requires you to configure the application you are using such as a web browser to use the proxy server. One solution is to use VPN, though using SSH tunnel SOCKS5 proxy can also achieve the same results. More importantly, you also don’t want anyone spying on your activities! Sometimes when we use public wireless hotspots and any other insecure networks, or even if the network has overly restrictive firewall, you cannot browse or access certain websites. But this time, we are going to use the SSH tunnel as a SOCKS5 proxy to our local machine. SSH client is usually used to connect a client to a remote machine securely and for executing commands on a remote computer.
