Chapter Four Part Two: How To Create A SSH Tunnel

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.

For most of the free SSH tunnels, their passwords will be reset every half an hour, 2 hours, 4 hours or some other time, which will be boring anyway.

To avoid the issue, you can buy a paid SSH tunnel, or create your own one, which will be very easy if you've already has a VPS, cloud computing or dedicated server.

The following will show you how to use your VPS to create a SSH tunnel:

SSH VPS Terminal Connect

Supposing that you've had a VPS, which IP is, then you can open your Terminal application and enter the following command line:

ssh -N -D 7070 [email protected]

Remember to replace "" with the IP address of your own VPS, and press the "Return" key, then enter your VPS account password, if nothing appear as a result, your SSH tunnel will be built successfully.

By the way, if you have created a VPN in your VPS, you can still use your VPS as a SSH tunnel.

But the above way is only available for you to use the SSH tunnel yourself, unless you want to share your whole VPS account with others. And to share a SSH tunnel account only with others, you can create a new and limited user instead of "root" by referring to the following 4 steps:

1. Log in your VPS root

Open a Terminal window, and enter the following command:

SSH [email protected]

Remember to replace "" with your own VPS IP.

2. Create a group

Enter the following command:

groupadd internetfreedom

You can replace "internetfreedom" with any name you like.

3. Create a limited user

useradd -d /home/freenutsdotcom -m -g internetfreedom -s /bin/false freenutsdotcom

The above command will create a new SSH user "freenutsdotcom" in the "internetfreedom" group, and who can't log in your VPS.

4. Create a password for the new user

Enter the following command:

passwd freenutsdotcom

You can enter any password (such as "123456") for the new user.

Now, you can share the username and password with your friends, who can then use your VPS SSH with the following command:

ssh -N -D 7070 [email protected]

Remember to replace "freenutsdotcom" with the new user, and "" with your own VPS IP.

Spread the love
This entry was posted in E-book and tagged . Bookmark the permalink.