Headless Raspberry Pi setup 2022

With the recent changes in raspberry pi os the default username ‘pi’ won’t allow login.

Headless Raspberry Pi setup 2022
Photo by Louis Hansel / Unsplash

As per the official raspberry blog at https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022 the default username pi and password raspberry will no longer be allowed for headless login.
So, even if you have put the ssh file in /boot and used wpa_supplicant.conf setup to connect to your wifi network, you will no longer be able to directly ssh login to headless rpi using the default user and password.

To work around this, there are two ways to configure the default user and password for the headless rpi configuration:

  • Using RPi writer advanced config setup

The Raspberry Pi Imager tool allows you to preconfigure an image with a user account. During chosen the source image and destination in Imager, click the “settings” button and use the Advanced options menu to provide a username and password, as well as any other preconfiguration you desire.

  • Using userconf file

I go this way. Put the userconf file in /boot with the following contents :


To generate password hash you can easily use openssl command :

openssl passwd -6

Now, I can login again to headless rpi without issue.