To permanently enable ssh for a headless setup, my understanding is that the simplest method is to create an empty file /boot/ssh on the boot partition. However, when I write to a file using this pathname, the change doesn't persist after I reboot. If I'm understanding correctly, then this is because I'm not actually accessing the boot partition, and I need to mount that somehow. How do I do that? I'm running Raspbian on a pi-zero, installed from NOOBS.
From the raspberry pi ssh documentation page (here)
When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted.
Don't forget to change the default password.
You NEED a keyboard and display to setup NOOBS so the solution to enable
ssh on a headless system is superfluous.
This CANNOT be done on NOOBS, until Raspbian is installed (because the boot partition does not exist).
raspi-config (or the GUI equivalent).