How To Connect To SSH Tunnel With Terminal

Looking for a simple, stable and significant VPS as your web hosting? Check out DigitalOcean, only $5 per month, and you can get $10 in credit just for signing up now.

When getting a free SSH tunnel, how to connect to it?

For Windows, you can install the "Tunnelier" software, and for Mac OS X, you can use "SSH Tunnel Manager", as mentioned before.

The following will show you another way to connect to your SSH tunnel without installing anything, but just with the Terminal application of Mac OS X.

Step 1. Find out the account data

When getting a SSH account, you need to find out the following 4 elements:

  • Server:such as "s4.alidage.org"
  • Username:such as "guest"
  • Password:such as "guest29080212737358"
  • Port: such as "22" as default.

The above example values are all for one of the Alidage.org SSH tunnel accounts.

Step 2. Connect to your SSH tunnel

When getting the above 4 elements, you can open the Terminal application, and enter the following command line:

SSH -N -D 7070 [email protected]

If the SSH tunnel is still available, then you can enter the password and connect to it successfully, as what you can see from the following image:

How to connect to SSH tunnel

The above command line is for the default port 22, if your SSH server's port is 80 or something else, then you will need to add "-p 'port'" in the command line, such as:

SSH -N -p 80 -D 7070 [email protected]

When the connection is successful, you can open your browser and set the SOCKS Proxy Sever IP address to 127.0.0.1 with port 7070, such as what you can see from the following image:

SSH proxy configuration

The above configuration is for Chrome, which will be same for Safari, and for Firefox, you can check out this post for reference, too.

Spread the love
This entry was posted in Free Online Anti-censorship Tools and tagged , . Bookmark the permalink.