Raspberry Pi 5 password not working

October 3, 2024, 21:55

e_xie

Hi everyone, I've recently been running into the issue of my pi refusing to ssh. It claims that the password is wrong ":
Permission denied, please try again
", even though I've never changed the default password (raspberry). I've flashed the SSD at least 3 times now. It's a fresh install, nothing has been changed. Pi is not overheating, RAM is not being used much at all.

e_xie

Power supply is the canakit one for a pi 5: 5a, 5v

e_xie

OS is Raspberry Pi 64bit

e_xie

using a SSD HAT

e_xie

ssd is completely new

e_xie

all connectors are secure

e_xie

plugging the pi into a monitor shows the environment without issues

e_xie

ssh is enabled

thunder07337

If you connect the monitor and enter the password, is it correct? Only with SSH is the password incorrect?

e_xie

Yes, only with ssh Iā€™m pretty sure

e_xie

To be 100 percent sure I also tried sudo passwd pi or whatever the command was to reset the password but it didnā€™t work

e_xie

Which is pretty weird considering this was my third flash

thunder07337

No, that is wrong. If you are logged in as user "Pi" you only do
sudo passwd
What does your SSH command look like?

e_xie

Yeah, my bad thatā€™s probably what I used

e_xie

I use ssh [email protected]

e_xie

Either that or the IP

thunder07337

Can't change the password? Then something is very wrong! Restart the OS and set a different user name. Pi is standard and is the first thing hackers try, so you should not use it. First of all avoid z and y in the password, if the keyboard layout is wrong this can lead to problems. Also avoid special characters until it is clear that the keyboard layout is correct.

oops.se

And you did check the chackbox for enabling SSH?

e_xie

yep

e_xie

alright I'll try again

e_xie

hopefully it's not a hacker, though there's still a possibility since I'm port forwarding port 22

thunder07337

Forwarded? Via the Internet?

e_xie

Huh? I made my router forward port 22 so I could ssh. Itā€™s dumb, I know

thunder07337

Yes, that's stupid, because if you are in the same network you don't have to forward port 22 in the router. You only need this if you want to access it from outside the network, i.e. from the Internet!

e_xie

yes that's what i was using it for

e_xie

ssh'ing for when I'm not at home

e_xie

I find it tedious to go to rpi connect, click a few times, and connect

thunder07337

It would be better if you connect to the network at home via VPN.

e_xie

thanks for the suggestion, I haven't tried that before

thunder07337

Have you at least installed fail2ban?

e_xie

nope

e_xie

I'll do it this flash

e_xie

Update: no longer have a problem after changing passcode and installing fail2ban

thunder07337

šŸ‘šŸ»