Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

What's wrong with my Raspberry Pi 2?

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
Gorg
Posts: 23
Joined: 2019-10-24 09:30

What's wrong with my Raspberry Pi 2?

#1 Post by Gorg »

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?

Gorg
Posts: 23
Joined: 2019-10-24 09:30

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

#2 Post by Gorg »

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..

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#3 Post by pylkko »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#4 Post by Head_on_a_Stick »

Thread moved to the Offtopic section.
deadbang

Post Reply