Raspberry Pi headless setup: Wi-Fi and SSH without monitor and keyboard

For most projects a Raspberry Pi needs neither a screen nor a keyboard – it runs “headless” and is managed via SSH. In the past you placed the files ssh and wpa_supplicant.conf on the boot partition for this. That no longer works with current versions of Raspberry Pi OS. Today the Raspberry Pi Imager takes care of it when writing the SD card.

1. Prepare the SD card with Raspberry Pi Imager

  1. Install Raspberry Pi Imager for Windows, macOS or Linux (on Ubuntu also via sudo apt install rpi-imager).
  2. Select the model, the operating system (for headless use preferably Raspberry Pi OS Lite) and the SD card.
  3. When asked about customisation (“Edit settings” / “OS customisation”), fill in the following items:
  • Hostname, e.g. pi-camera
  • User name and password – the former default user pi with the password raspberry no longer exists
  • Wi-Fi: SSID, password and country (e.g. DE) – without a country the Wi-Fi stays blocked
  • Time zone and keyboard layout
  • Enable SSH – preferably with “Allow public-key authentication only” and paste your own public key

Then have the card written, insert it into the Pi and connect the power. The first boot takes one to two minutes because the file system is being expanded.

2. Find the Pi on the network

On most home networks the Pi can be reached directly by its name:

ping pi-camera.local

If that does not work, take a look at the router’s device list (on a Fritz!Box under Home Network → Network) or run a network scan, for example with nmap -sn 192.168.178.0/24.

3. Connect via SSH

ssh user@pi-camera.local

The first thing to do afterwards is to update the system:

sudo apt update && sudo apt full-upgrade -y

Changing the Wi-Fi later

Raspberry Pi OS uses NetworkManager. This is how you add another Wi-Fi network via SSH (e.g. over the cable):

sudo nmcli dev wifi connect "My-WiFi" password "secret"

Alternatively, everything can also be done through the menu of sudo raspi-config (System Options → Wireless LAN). How good the reception is and how to prevent dropouts caused by power saving is covered in the article Wi-Fi signal strength on Linux and the Raspberry Pi.

Originally published in 2017 for Raspbian Jessie, completely revised in November 2026.