Ssh – Why VPN when I can just use SSH keys

sshssh-keysvpn

A friend of mine installed VPN on our LAMP development server. Previously, we just used SSH and sometimes SSH public keys to avoid password prompts. My question is, what is the advantage of using VPN over just using SSH public keys? What new features can I take advantage of? Why might VPN be necessary?

Best Answer

If you're using VPN to gain access to one machine it really comes down to how lazy do you want to be? About the only advantage a VPN gives you is the need to not use port forwarding or SOCKS proxy over SSH. This can be advantageous for things like FTP, or UDP applications (such as DNS). In addition if you're going to SSH over your VPN link to one host it's a small waste of resources. Bottom line, it can make some things easier to get access to, and you can now test some services easier (such as DNS), but if it's just one host, you don't really gain anything useful.

If on the other hand you had a few systems/devices on the other end of the VPN then it can be advantageous as you will be able to ssh directly to your hosts without the need to bounce through a jump-box or set up inbound ssh port forwards. In addition if your VPN tunnel is always up and can be routed to on both ends it can be useful for performing remote backups of your data.