How to securely access an SSH server without a static IP address?

Hello everyone,
I hope this is an alright spot to post this.
However, I recently set up a home server machine and I cannot seem to figure out how to properly utilize the SSH server without a static IP.

Does anyone have any utilitarian solutions to this problem?
Thank you so much in advanced.

2 Likes

Dynamic DNS.

3 Likes

Automated hourly script to update pointers:

Would be helpful to know how often the IP address actually changes.

There are two problems here:

  1. How to be secure?
  2. How to find the server in the first place?

The first reply somewhat addresses the second question.

The first question would involve being very careful to cache and check the fingerprint on any client computer.

Given your setup, you may also have to contend with NAT.

1 Like

My recommendation is setting up a wireguard VPN in your local network, expose that through NAT via non-default port, setup dynamic DNS to access the VPN and once connected you can securely SSH into your server. I still recommend using SSH via public key authentication only though, just to be safe.

2 Likes

This is the way:

  • do not expose SSH to your public IP, only allow it over the local network + Wireguard network
  • use Wireguard (OK to expose port on public IP) + DynamicDNS
3 Likes