What's wrong with my Raspberry Pi 2?

If it doesn't relate to Debian, but you still want to share it, please do it here

What's wrong with my Raspberry Pi 2?

Postby Gorg » 2021-01-30 20:59

Hi everyone,

I just bought an old Raspberry Pi 2 simply to use it for PiHole and as a recursive DNS at home.

I downloaded the image (https://raspi.debian.net/tested-images/), dd'd it onto the SD card and booted the system. All normal up to this point. Then I set a root password with passwd and shut down the pi again to actually hook it up to my router via cable.

After that, I powered it on again and tried to connect to it via SSH from my desktop, but couldn't. Whatever I try, I just get a "Permission denied." error:

Code: Select all
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.

The password has to be correct, as I hooked up the Pi to a monitor and keyboard again and the same password works when entered directly. I tried looking through /etc/ssh/sshd_config, but found nothing that would prevent a remote login.

I then tried to load updates, but I just got "Failed to fetch..." errors, so I can't even update or install software directly.

However, my router sees the Pi with its correct IP-address and I can ping it from my desktop, so I really don't know what's wrong.

Does anybody have an idea what could be the issue?
Posts: 17
Joined: 2019-10-24 09:30

Re: What's wrong with my Raspberry Pi 2?

Postby Gorg » 2021-01-31 00:16

So, it turns out after a small break and revisiting the issues, I found both solutions.

The SSH issue was indeed related to /etc/ssh/sshd_config. Therein, one line read:

Code: Select all
#PermitRootLogin no

While reading through it, my brain must have interpreted "Commented-no" as a "yes", however the comment appears to be the default, so I had to uncomment the line and change no to yes, then SSH worked.

The update issue was simply a DNS typo that must have happened to me when I set the static IP (I don't use a 1-digit DNS and have accidentally swapped two similar segments).

So, sorry for bothering, but maybe this can help someone..
Posts: 17
Joined: 2019-10-24 09:30

Re: What's wrong with my Raspberry Pi 2?

Postby pylkko » 2021-01-31 06:52

This is the wrong forum, the raspberry pi forum has 100 X the users of this forum and they all use raspberry pi and many use pihole. There is a reason ssh for root is typically not allowed (security). It is more secure to allow normal user to ssh in and the use sudo, for example. Perhaps you should consult the documentation of pihole to see what is the proper way to connect to the server.
User avatar
Posts: 1800
Joined: 2014-11-06 19:02

Re: What's wrong with my Raspberry Pi 2?

Postby Head_on_a_Stick » 2021-01-31 08:47

Thread moved to the Offtopic section.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Posts: 13241
Joined: 2014-06-01 17:46
Location: /dev/chair

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 16 guests