I am trying to SSH into a ubuntu desktop that is constantly running a vpn service - think nordvpn. Because the vpn 'changes' my IP address, this seems difficult to me. I am a complete beginner in this realm. Thanks.
1 Answers
You might be interested in trying a Dynamic DNS solution. This is where your system updates a DNS entry every time it starts up, or whenever the WAN IP has changed. This has the benefit of allowing you to use a DNS record instead of a [changing] IP address that can easily be added to your ~/.ssh/config. Please understand that DNS entries have TTL values that can delay updates to the IP. This delay is, by default, 300s, or 5m.
Typically, you find a Dynamic DNS provider, create an account, and follow their instructions for setup. Alternatively, if you use a hosting provider such as Linode, you could write your own script to provide this functionality. More details on how to easily set up Dynamic DNS with existing solutions are available in the Ubuntu Community - DynamicDNS document.
Be warned! You are using this VPN service [assumingly] for anonymity. You are suggesting that you wish to enable your sshd service to listen on your VPN IP. Do you really want to open your machine up to anonymous access? You probably don't want to do that, for your own security.
- 11,658