Technology, Tutorial

Facepalm Fix for SSH Permission denied Error on Raspberry Pi

I’m labeling this post for Raspberry Pi (RPI) – because it just happened to happen on an RPI. I suppose it could have been any headless server…

It probably happened on an RPI because it’s not a ‘normal’ server and you have to mess around with SD cards and can’t easily copy/paste stuff.

Anyways, to make a longer story shorter, if you’re using a modern RPI install, this next link should be all the instructions you need, which I followed:

Link to RPI SSH instructions

So, if you, like me, followed these instructions above, and you’re still getting the never-ending cryptic Permission denied, please try again. message, you might be having this issue:

Problem: Wrong Password!

Can it be true? Can it be that simple? Yes, it can be.

And I only share this post because when you are 100% sure that your password is right… when in fact it isn’t – you also might spend all day on this like I did (I’m only human after all)

All I want to do here is share how this happened to me to trigger your memory to see if this might be you:

  • I installed a fresh install of RPI
  • I was using a password manager for a good strong password (consider using a weak one and then strengthening it after install to avoid this)
  • When it came time to manually type the strong password into the RPI during install (I didn’t have my password manager accessible on the RPI), I obviously hit a wrong key.
  • I then tried to SSH in and got the endless Permission denied, please try again. error… Obviously, genius.

Solution

The problem is, because the password was randomly generated, and I had no idea what it actually was, what do I do now?

All I had to do was this, in the end, while logged in with a screen into the RPI:

sudo password username

I ran that, was 10x more careful with the password and then boom, SSH in was no problem after that.

Point here is that you might be fighting something that isn’t even the thing, but instead your simple password error. Very easy to fix if so.

Bonus Section – Connection Refused!

As a tag-on section, if you are getting the ‘connection refused’ message, you might have my other issue which was that the building I’m in has a crazy traffic policy in router and it was blocking port 22 on everything… oddly. So once I got into the admin router (lucky password guess, haha) I was able to open port 22 on the RPI and things worked. You can put a tip in the tip jar if that helped you.

Tagged , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *