By default, OpenSSH Server
should listen on all network interfaces. You can tell with the command netstat -pan
and search for the "listening" line showing that the SSH daemon is listening (probably on port 22) on IPv4 address 0.0.0.0:22
or the IPv6 address :::22
. If it's bound to a specific IP address, then you or someone else edited the configuration file to listen on a specific IP.
More likely, you are already listening on all interfaces, which means that even as interfaces and IP addresses come and go, the ssh daemon will bind to all of the interfaces and IPs automatically without having to restart the daemon.
If that's the case, the reason you can't connect is that the VPN is routing all inbound/outbound traffic over the VPN's public IP address. You would have to set up custom routing rules on your server to route around the VPN; this is typically called split tunneling or multi-homing and is sometimes considered to be an IT security violation if the VPN is connecting to sensitive information.
The other way is to configure the VPN for port forwarding, so that it will route accesses to V.V.V.V:22
to your server rather than dropping them or responding with its own ssh daemon. But you said you don't have root access to the VPN, so I'm guessing that's not possible.
Depending on what VPN software you use, the default behavior is probably to disable all inbound/outbound traffic that isn't going through the VPN tunnel... so you'll have to find a way to bypass that. This is software (operating system / VPN software) specific, and since you gave us NO details on what type of VPN or operating system, we can't help you there.
Note for future questions: please try to be as specific as possible when talking about software. Rather than referring to generic technologies like "VPN", give the actual name of the software. And never ask a software question without providing your operating system and version.