VPN or SSH Tunnel: Which One is More Secure?

RapidVPN/ September 4, 2016/ Blog/

VPNs and SSH tunnels are similar in that they both securely channel traffic across an encrypted connection. However, they do have differences. In order to decide which one to use it is important to understand how they both work.


How VPN works

A VPN or virtual private network enables private and public networks to connect. VPN’s are often used by companies to share files across networks, and to enable employees to access resources when they are away from the company. VPN’s provide a secure connection and so keep data private. This means that resources are not shared over the public internet. When employees connect to company VPN servers they appear to be a part of the business’s private network and so can access files and data.


How SSH Tunnel works 

SSH tunnels, or secure shell tunnels, also use strong encryption, and are used to forward network traffic. SSH tunnels work similarly to browsing the internet using a VPN and traffic looks like it is coming from the SSH server. However, SSH tunnels do have a number of limitations and as a result SSH tunnels are sometimes referred to as ‘poor man’s VPN’. For example SSH tunnels are a little more complicated and harder to configure than VPN’s. For privacy, SSH tunnels act as a SOCKS proxy which can be used to configure applications to use that proxy. SHH tunneling involves traffic entering the SOCKS proxy on a local system and then the SSH forwards it through the encrypted SSH connection.


VPN is the best option for most

SSH tunnels do not offer all of the benefits of VPN’s. For example, to use a SSH tunnel proxy you have to configure each application to use that proxy which is not only a hassle, but also risky. There is also no assurance that all traffic will be sent via the SSH tunnel. It is also much harder to share network files with an SSH tunnel than with a VPN.