I have a pi in my local network, and I sometimes want to connect to it via ssh. However, the pi always has a different IP-address, so I look it up beforehand each and every time. Is there a way for me to connect to my pi without looking up it's IP address? I could assign a static IP in my local network, but I'm not sure if that's good practice or whether there are better solutions. If there aren't, it would be great if s.b. could explain how to assign a static IP to my pi in my local network. Thanks a lot in advance.
PS: I am looking to connect to my pi via ssh programmatically. So a software solution that finds the IP address might not do.