Setting the SSH password with Pi Imager is not working for me
Using Pi Imager 1.7.2 to install Raspbian Lite 32 bit on an SD card. I click the cog and enable SSH, set my username and password, then write to the card. When I plug the card into my Pi and attempt to SSH in, it just says access denied. I have tried multiple times, reinstalling Pi Imager, and even tried a different SD card, but the problem persists. Spent all afternoon on this and I have no clue how to proceed. (On a side note, I really miss the default pi/raspberry login right now...)
Re: Setting the SSH password with Pi Imager is not working for me
Give this a try:
1. Write 2022-04-04-raspios-bullseye-armhf-lite.img to an SD card using Etcher.
2. Create a file named user userconf (or userconf.txt) containing the following:
3. Place userconf (or userconf.txt) plus an empty file named ssh (or ssh.txt) in the BOOT (FAT32) partition of the SD card.
4. Insert the SD card in the Raspberry Pi and it should boot with access to user 'pi' (password : raspberry) via SSH.
1. Write 2022-04-04-raspios-bullseye-armhf-lite.img to an SD card using Etcher.
2. Create a file named user userconf (or userconf.txt) containing the following:
Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
4. Insert the SD card in the Raspberry Pi and it should boot with access to user 'pi' (password : raspberry) via SSH.
-
- Posts: 1
- Joined: Thu Apr 21, 2022 9:01 pm
Re: Setting the SSH password with Pi Imager is not working for me
I had the same issue. When I inserted the password, It gave me "Access denied".
I found out that in the last version of OS lite for raspberry (2022-04-04-raspios-bullseye-armhf-lite.img) the default password is not defined. As the fastest and dummy way, I flashed a version from 2021-05-07 (2021-05-07-raspios-buster-armhf-lite). In this version, the password is defined as "raspberry". This solved my access problem

I found out that in the last version of OS lite for raspberry (2022-04-04-raspios-bullseye-armhf-lite.img) the default password is not defined. As the fastest and dummy way, I flashed a version from 2021-05-07 (2021-05-07-raspios-buster-armhf-lite). In this version, the password is defined as "raspberry". This solved my access problem

Re: Setting the SSH password with Pi Imager is not working for me
AlessandroHDO wrote: ↑Thu Apr 21, 2022 9:12 pmI had the same issue. When I inserted the password, It gave me "Access denied".![]()
I found out that in the last version of OS lite for raspberry (2022-04-04-raspios-bullseye-armhf-lite.img) the default password is not defined. As the fastest and dummy way, I flashed a version from 2021-05-07 (2021-05-07-raspios-buster-armhf-lite). In this version, the password is defined as "raspberry". This solved my access problem![]()
If your goal is run an obsolete version of Raspberry Pi OS, congratulations, you accomplished it.
- HawaiianPi
- Posts: 7749
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Setting the SSH password with Pi Imager is not working for me
I have done the same and it works fine for me (and by the way, it's Raspberry Pi OS, not Raspbian).
Do you also need to change location settings (perhaps an input error due to keyboard layout)?
Did you try setting that with Raspberry Pi Imager?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: Setting the SSH password with Pi Imager is not working for me
Thanks, this is the perfect solution for HEADLESS systems.....
- HawaiianPi
- Posts: 7749
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Setting the SSH password with Pi Imager is not working for me
The solution for headless systems was covered in a news article when the April images were released.
https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: Setting the SSH password with Pi Imager is not working for me
Also see the helpful post by RonR earlier in this thread to create the user pi with the old default password:
1. Write 2022-04-04-raspios-bullseye-armhf-lite.img to an SD card using Etcher.
2. Create a file named user userconf (or userconf.txt) containing the following:
3. Place userconf (or userconf.txt) plus an empty file named ssh (or ssh.txt) in the BOOT (FAT32) partition of the SD card.Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
4. Insert the SD card in the Raspberry Pi and it should boot with access to user 'pi' (password : raspberry) via SSH.
Re: Setting the SSH password with Pi Imager is not working for me
so I have tried this with the imager as well as the config file using the lite image, no luck.
any ideas what is going wrong?
all I get is the following when trying to log in
login as: root
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
any ideas what is going wrong?
all I get is the following when trying to log in
login as: root
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
- Attachments
-
- Capture.PNG (22.99 KiB) Viewed 15805 times
-
- Capture.PNG (19.14 KiB) Viewed 15805 times
-
- Capture.PNG (20.03 KiB) Viewed 15805 times
Re: Setting the SSH password with Pi Imager is not working for me
But to be fair, an 'apt update && apt full-upgrade' will bring all the installed packages up to date, so it's not horribly obsolete.RonR wrote: ↑Thu Apr 21, 2022 9:54 pmAlessandroHDO wrote: ↑Thu Apr 21, 2022 9:12 pmI had the same issue. When I inserted the password, It gave me "Access denied".![]()
I found out that in the last version of OS lite for raspberry (2022-04-04-raspios-bullseye-armhf-lite.img) the default password is not defined. As the fastest and dummy way, I flashed a version from 2021-05-07 (2021-05-07-raspios-buster-armhf-lite). In this version, the password is defined as "raspberry". This solved my access problem![]()
If your goal is run an obsolete version of Raspberry Pi OS, congratulations, you accomplished it.
That said, it's best practice to move forward with the latest/greatest images when building new systems.
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Re: Setting the SSH password with Pi Imager is not working for me
I don't believe the RPi Imager supports logging in as root instead of a normal user.
Also, root login is disabled by default.
You must enable root login in '/etc/ssh/sshd_config' by changing:
Code: Select all
#PermitRootLogin prohibit-password
Code: Select all
PermitRootLogin yes
Code: Select all
systemctl restart ssh
Re: Setting the SSH password with Pi Imager is not working for me
I agree with you in spirit, but it IS receiving security updates, therefore not totally obsolete. It is deprecated, and eventually WILL become obsolete, but right now it's teetering on the brink.
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Re: Setting the SSH password with Pi Imager is not working for me
RonR wrote: ↑Wed Jun 01, 2022 11:04 pm
I don't believe the RPi Imager supports logging in as root instead of a normal user.
Also, root login is disabled by default.
You must enable root login in '/etc/ssh/sshd_config' by changing:
toCode: Select all
#PermitRootLogin prohibit-password
You must restart ssh following this change:Code: Select all
PermitRootLogin yes
Code: Select all
systemctl restart ssh
Thanks for getting back to me, I figured that might be the case, was hoping with the new mechanisms they would have removed that extra work. Rebuilding from scratch again with the pi user and will see how that goes
Re: Setting the SSH password with Pi Imager is not working for me
When you get tired of spending too much time rebuilding your system, have a look at sdm. You can rebuild your system EXACTLY the way you want it with practically zero effort in 15-20 minutes on a Pi4 (slower Pis obviously take longer).
Pi tools:
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Quickly and easily build customized exactly as-you-want SSDs/SD Cards: https://github.com/gitbls/sdm
Easily run and manage your network's DHCP/DNS servers on a Pi: https://github.com/gitbls/ndm
Easy and secure IPSEC/IKEV2 VPN installer/manager: https://github.com/gitbls/pistrong
Lightweight Virtual VNC Config: https://github.com/gitbls/RPiVNCHowTo
Re: Setting the SSH password with Pi Imager is not working for me
RonR wrote: ↑Tue Apr 19, 2022 2:22 amGive this a try:
1. Write 2022-04-04-raspios-bullseye-armhf-lite.img to an SD card using Etcher.
2. Create a file named user userconf (or userconf.txt) containing the following:
3. Place userconf (or userconf.txt) plus an empty file named ssh (or ssh.txt) in the BOOT (FAT32) partition of the SD card.Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
4. Insert the SD card in the Raspberry Pi and it should boot with access to user 'pi' (password : raspberry) via SSH.
Hi, I've tried to use your example to log in to my raspberry pi but it doesn't work. When I try to log in after I've copied
Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
- butchkemper
- Posts: 160
- Joined: Sat Jul 22, 2017 8:03 pm
- Location: Sachse, Tx. Dallas is a nearby suburb of Sachse.
Re: Setting the SSH password with Pi Imager is not working for me
The config file method establishes the userid "pi" with the password "raspberry" and you are trying to login with the userid "root".dloranger wrote: ↑Wed Jun 01, 2022 10:41 pmso I have tried this with the imager as well as the config file using the lite image, no luck.
any ideas what is going wrong?
all I get is the following when trying to log in
login as: root
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Access denied
root@OpenRepeater's password:
Butch
- butchkemper
- Posts: 160
- Joined: Sat Jul 22, 2017 8:03 pm
- Location: Sachse, Tx. Dallas is a nearby suburb of Sachse.
Re: Setting the SSH password with Pi Imager is not working for me
You need to login with the userid "pi" and the password "raspberry" because that is what the userconf file sets.kini wrote: ↑Fri Sep 02, 2022 9:38 pmRonR wrote: ↑Tue Apr 19, 2022 2:22 amGive this a try:
1. Write 2022-04-04-raspios-bullseye-armhf-lite.img to an SD card using Etcher.
2. Create a file named user userconf (or userconf.txt) containing the following:
3. Place userconf (or userconf.txt) plus an empty file named ssh (or ssh.txt) in the BOOT (FAT32) partition of the SD card.Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
4. Insert the SD card in the Raspberry Pi and it should boot with access to user 'pi' (password : raspberry) via SSH.
Hi, I've tried to use your example to log in to my raspberry pi but it doesn't work. When I try to log in after I've copied
into userconf.txt (I've tried userconf too) file it just returns access denied same as without the usercomf file. Is this still supported?Code: Select all
pi:$6$c70VpvPsVNCG0YR5$l5vWWLsLko9Kj65gcQ8qvMkuOoRkEagI90qi3F/Y7rm8eNYZHW8CY6BOIKwMH7a3YYzZYL90zf304cAHLFaZE0
Butch
Re: Setting the SSH password with Pi Imager is not working for me
Yes, I know that. I've tried to log in with username pi and password raspberry. I don't know why you think I've tried it with username root.butchkemper wrote: ↑Fri Sep 02, 2022 10:19 pmYou need to login with the userid "pi" and the password "raspberry" because that is what the userconf file sets.
- HawaiianPi
- Posts: 7749
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Setting the SSH password with Pi Imager is not working for me
Using Raspberry Pi Imager's Advanced options, or manually configuring the old way, with the addition of a userconf file, works for myself and most others.
If it isn't working for you, then either you have done something wrong, or have omitted a step.
Tell us EXACTLY what you did, step by step, from card creation to login failure (leave nothing out).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: Setting the SSH password with Pi Imager is not working for me
Ok, I've installed the Raspberry PI OS via the Raspberry Pi Imager by selecting the OS , the SD card and then I clicked on write. When it finished I've put ssh.txt and userconf.txt (with the username and password) file into the boot directory. Then I've inserted the SD card into the Raspberry Pi and turned it on. When I've tried to log in via Putty it responded with Access denied message.
- HawaiianPi
- Posts: 7749
- Joined: Mon Apr 08, 2013 4:53 am
- Location: Aloha, Oregon USA
Re: Setting the SSH password with Pi Imager is not working for me
I just tested this procedure again buy writing 2022-04-04-raspios-bullseye-armhf-lite.img.xz to an SD card with Etcher, then adding the 'ssh' and 'userconf' files (with the username and hashed password from RonR's post above), along with wpa_supplicant.conf (for my wireless network).
All of those files were put on the small FAT32 "boot" partition of the card. Then I safely ejected the card and used it to boot one of my Raspberry Pi computers, and after waiting for it to boot, I was able to SSH login as the pi user with the password raspberry.
So what aren't you telling us (I asked you not to leave anything out)?
For example, what model of Pi is it, and how is it connected to your network?
What kind of network is it?
What else is connected to your Pi?
What are you using for a power supply?
All of those files were put on the small FAT32 "boot" partition of the card. Then I safely ejected the card and used it to boot one of my Raspberry Pi computers, and after waiting for it to boot, I was able to SSH login as the pi user with the password raspberry.
So what aren't you telling us (I asked you not to leave anything out)?
For example, what model of Pi is it, and how is it connected to your network?
What kind of network is it?
What else is connected to your Pi?
What are you using for a power supply?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?
lots of pop-ups, and where is that annoying music coming from?
Re: Setting the SSH password with Pi Imager is not working for me
I'm using Raspberry Pi 2B+ with an original power adapter (it was included in the box). It is connected to 1000 Gb/s LAN network and there is nothing else connected to the Pi.
Re: Setting the SSH password with Pi Imager is not working for me
There is not and never has been such model of RPi. If you cannot get that right, what else are you not doing correctly?
Use RPi Imager to preload the username and password as in someone's screen grab above. (But don't use root as the username name.)
Quis custodiet ipsos custodes?
Re: Setting the SSH password with Pi Imager is not working for me
kini wrote: ↑Fri Sep 02, 2022 11:30 pmOk, I've installed the Raspberry PI OS via the Raspberry Pi Imager by selecting the OS , the SD card and then I clicked on write. When it finished I've put ssh.txt and userconf.txt (with the username and password) file into the boot directory. Then I've inserted the SD card into the Raspberry Pi and turned it on. When I've tried to log in via Putty it responded with Access denied message.
Requests for clarity seem to be continually needed...
When I've tried to log in via Putty
How did you know what host or target to specify for PuTTY to connect to? Did the username you configured for PuTTY match the one in userconf.txt?