Hacker News new | ask | show | jobs
by tzs 286 days ago
Also in the imager you can tell it to enable SSH, add an SSH key or have it generate one, and set it to not allow password authorization over SSH.

It does indeed make setting up a headless RPi quite convenient, although afterwards you do actually have to find the thing on your network.

By default it has the hostname "raspberrypi" and handles mDNS so SSHing to raspberrypi.local often does the trick, but could be a problem if you have more than one. You can set the hostname in the imager to deal with that.

Another common approach is to check your router's DHCP client list or connected device list. If you are lucky your router includes the hostname if the client sent one. If it only shows MAC address, IP address, and DHCP remaining lease you can look for something that just got its lease.

Personally, once I learn the Pi's MAC addresses either from my router's DHCP server or by logging on to the Pi and using "ip link show" I go to my router's DHCP settings and assign reserved IP addresses to those Mac addresses. Then whenever I re-image or boot from another drive with a different image it doesn't matter. It's going to be on the same IP.