Should you encounter the issue that you cannot login to a freshly imaged Raspberry Pi with Raspbian OS, I have found the only solution to be:

1) Unpack the .xz file
2) dd the unpacked file as normal via terminal to your USB
3) Reseat the USB so that you can access the rootfs partition
4) Enter the rootfs partition via terminal
5) Generate a password for the pi user like so:

echo 'mypassword' | openssl passwd -6 -stdin

6) Copy or store this sequence somewhere
7) cd etc
8) sudo nano shadow
9) Insert the generated encrypted password between the two colons for the pi user like so:

10) Save the file
11) Reboot
12) Login via SSH with the pi user will work now

Back to content