Raspberry Pi Headless Server from Scratch WHY Since ISP (Internet Service Provider) started to change public IPs at will, I wanted to have sort of a control center network appliance that would monitor things like Public IP changes and possibly other things (like speed tests, checking if certain external sites are up, etc.) utilizing existing, unused, and, probably soon, outdated hardware.
WHAT Raspberry Pi 1 Model B+ Board Clear acrylic case for RPi Model B+ 8GB SD card Old iPhone 1A adapter (works fine for Model 1b) Micro USB to USB Cable RJ45 Ethernet cable HOW Prepare RPi SD Card Download Raspberry Pi OS Lite (at the time of writing Kernel version 5.00 released on March 4th 2021) Download Balena Etcher or similar software to copy image to SD card (Raspberry Pi Imager did not work for me but was my first choice) Plug SD Card into your Windows / OSX / Linux host machine and copy downloaded image to SD Card Navigate to the SD Card (you might have more than one drive mounted / available under windows) and create an empty file named ssh (this will ensure that SSH server on headless Raspberry Pi (RPi) will start on the first boot) First Time Setup On windows I have download and installed wonderful Cygwin that provides a large collection of GNU and Open Source tools to provide functionality similar to a Linux distribution on windows. If using Windows 10, you might want to look into much heavier but “out of box” option called WSL2. Unmount SD Card and plug it into RPi (via SD adapter if required), plug in RJ45 for wired internet connection (other side should go to your router), and then plug in Power cable. RPi lights will be lit. Identify an IP address of newly built RPi using either your Router’s DHCP list of IPs – RPi MAC addresses would start with B8-27-EB or use one of the utilities like Adafruit Pi Finder, nmap, Angry IP Scanner (try older version with a single executable ipscan.exe), or just type in something like “ping -4 raspberrypi.local” at the command prompt. Sample Naming RPi hostname: raspberry ==> headless_horseman RPi IP Address: 192.168.1.123 SSH Port: 22 ==> 7522 Sample Sudo User / Pass: mysudouser / Pwd.926! Sample SSH User / Pass: mysshuser / T3n.F0ur! SSH Public key file on Host machine: ~/.ssh/id_rsa-headless_horseman.pub First Time Login Using Cygwin or WSL2 (from windows) or Terminal (on OSX / Linux), connect to RPi (default user “pi” with default password “raspberry”): user@host $ ssh pi@192.168.1.123
...