Hacker News new | ask | show | jobs
by flatiron 1836 days ago
you can fix the ip changing on reboot by pegging the MAC to an IP in your router. if you are also running something like pi-hole you can give it a local dns entry too, which makes it even easier to remember.
1 comments

On my OS at least (ubuntu and probably many others) it can resolve by hostname (after all that is the whole point of having hostnames). So I just do `ssh remarkable` without even having an `.ssh` entry for it.
That can work, if your LAN router's DHCP and DNS are set up to respect the hostname suggested by the client, to update it in the DNS for the LAN domain, and tell DHCP clients to use the router for DNS.

For LAN devices you want to access as a server, I think it's usually easiest and most reliable to just designate a permanent IPv4 address for them with your router's DHCP server, like what OP suggested.

Your SSH client will probably prefer static IP addresses, too, for the record-keeping it probably does about which servers it knows and at what addresses.