Skip to content
BENIBIX Learn

SSH Tunnel vs VPN

People often think an SSH tunnel is a small VPN. It is not. A tunnel carries one port to one place, inside one SSH login. A VPN joins your whole computer to a private network, so every app goes through it. Use a tunnel for one service and a VPN for a network.

Infrastructure🔑 SSH & Remote Access

SSH Tunnel

A way to send one more link through SSH. It reaches a private service.

An SSH tunnel carries another connection inside your SSH login. You pick a port on your own computer. Anything sent to it travels through SSH and comes out on the server's side. That lets you reach a service the server keeps private, like a database. Nothing new has to be opened to the internet.

Example
Emma's database only works from inside her server. She opens a tunnel to it. Her laptop's app then uses port 8080.
Why it matters
You can keep a database off the web and still reach it yourself.
Full entry
Infrastructure🔒 Security

Virtual Private Network (VPN)

A locked tunnel across the web. It links you to a private network.

A VPN makes a private, scrambled link across the public internet. Everything you send goes through this tunnel to a VPN server first. People on the same café Wi-Fi only see scrambled data. Companies use a VPN so staff can reach the office network from home. Paid home VPNs also hide the sites you visit from your local network. But the VPN company can still see them.

Example
Emma works from a hotel. She turns on the company VPN, and her laptop can reach the office file server as if she were at her desk.
Why it matters
It keeps data safe on networks you do not own, and lets staff work from anywhere.
Full entry

In one line

SSH Tunnel
A way to send one more link through SSH. It reaches a private service.
Virtual Private Network (VPN)
A locked tunnel across the web. It links you to a private network.