2
I have a desktop at work that I like to keep synchronized with my home computers using Unison, which connects through SSH. I also sometimes like to remote in to the work computer using SSH.
My work network is starting a new policy that will only allow connections from outside the network if they are over a VPN.
Is there a way that I can adjust my SSH configuration so that whenever it tries to log in to the work computer, it goes through the work VPN?
To be clear, I do not want to have to manually connect to the work VPN each time I want SSH to connect to the work computer. I also do not want to be permanently connected to the work VPN.
Note that I can freely change both the client (my home computers) and server (work computer) SSH configurations. Also, I don't think it should matter, but all machines in question are Linux boxes. I am using OpenSSH and the work VPN is openVPN.
Clarification: The main reason I want to not be permanently connected to the work VPN is to not have to worry about following their terms of service. So I want only the SSH traffic to be sent through the VPN and nothing else.
Are these solutions going to make my entire connection go through the VPN? I don't want that to happen because I don't want to be subject to my work's terms of service. – evencoil – 2016-07-20T18:07:51.353
Ah, I'm sorry, I literally knew that I forgot something. Thanks for the reminder. I will update my answer accordingly. – stueja – 2016-07-21T04:55:13.483