Using SSH as a VPN Alternative

Instructor: David Delony

David is a freelance writer specializing in technology. He holds a BA in communication.

In this lesson, you'll follow an IT worker who uses SSH as a lightweight VPN alternative when traveling to maintain privacy. You'll see Alice set up a tunneled SSH connection to stay secure on the road without all the overhead of a corporate VPN connection.

Why Use SSH as a VPN Alternative?

Alice has always loved computers, so that's why she got a degree in computer science. After some experience in the industry, including working at startups and large corporations, she decided to strike out on her own as an independent developer. She's doing pretty well, even netting some clients out of state. She works out of her home with a small collection of homemade servers, but now she needs to travel to a client in person. How does she say secure when on the road?

She could sign up for a virtual private network (VPN) account, but she wants to cut costs since she's in business by herself. She has enough technical know-how to come up with her own solution for an alternative to VPN. Since she's familiar with Secure Shell (SSH), she can simply use that when she wants to connect.

SSH Proxy

Both SSH and VPN encrypt the connection between the host computer and the remote system to keep the information safe from eavesdroppers. This means that it will be difficult to steal information like usernames, passwords and credit card numbers, especially over public Wi-Fi connections like the kind Alice will find when working away from home.

SSH can duplicate some of the functionality of VPN with lower overhead, meaning that it's much more manageable for one person to set up than VPN is. Since Alice doesn't have a full IT department behind her, using SSH has a real advantage for her over VPN.

Using a VPN connection this way is known as tunneling or port forwarding. The notion is similar to digging an underground tunnel to escape a prison.

She can just connect to one of her home servers running SSH already using the command line on her laptop:

ssh alice@example.com -L 9000:example.com:3000


SSH port forwarding


This starts up the SSH client as usual but forwards the port on her computer, in this case 9000, to the port 3000 on her server. Now that the proxy's set up, she just has to tell her web browser or any other Internet software to use it. Most programs have a setting for proxy servers. For the address on the server, she'll use either 'localhost' or the IP address 127.0.0.1 because the 'server' is on her machine.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support