https://www.raspberrypi.org/documentation/remote-access/ssh/README.md> 3. ENABLE SSH ON A HEADLESS RASPBERRY PI
For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card. When the Pi boots, it looks for the ssh file. If it is found, SSH is enabled, and the file is deleted. The content of the file does not matter: it could contain text, or nothing at all.