You get locked out of your VPS because once the VPN service is up, your ssh packets get routed via the VPN not your VPS's public IP 50.2.1.3. Lets assume your server's: Public IP is 50.1.2.3 (as per your example setup) Public IP Subnet is 50.1.2.0/24; Default Gateway is x.x.x.1; eth0 is device to gateway; Do the following using iproute2:

Nordvpn Over Ssh 💁KeepSolidPros+ Jul 19, 2020 Tunneling with Putty (SSH), a home made VPN of sorts Aug 26, 2014 Troubleshooting SSH and TFTP Failure over a Site-to-Site Apr 03, 2015

SSH tunneling is a method of transporting arbitrary networking data over an encrypted SSH connection. It can be used to add encryption to legacy applications. … It also provides a way to secure the data traffic of any given application using port forwarding, basically tunneling any TCP/IP port over SSH.

Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH. SSH provides a secure channel over an unsecured network in a client–server architecture, connecting an SSH client application with an How to Use SSH Tunneling to Access Restricted Servers and Jul 12, 2017

Git over an ssh tunnel (like through a firewall or VPN

Using Xming X Window Server over a VPN - Stack Overflow Another option that is often useful as it works over a VPN or simple ssh connectivity is ssh tunneling or X11 forwarding over ssh. This simulates connectivity to the X server on your local box by redirecting a port on your UNIX host to the local port on your X server box. Your display will typically be something like localhost:10.0 for the [SOLVED] MTU issues in VPN connections - Networking