Mini ad blocking pi hole kit question

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
geerowhas
 
Posts: 1
Joined: Sat Dec 22, 2018 4:45 pm

Mini ad blocking pi hole kit question

Post by geerowhas »

Hello!

I received my kit and began following the instructions. I configured my wifi , enabled UART, and enabled SSH. Plugged the micro SD card, power and got my shiny green light going.

Then I tried got into my terminal and attempted to ping then tried to ssh into the device.

I got the following messages for each command:

ping -c 3 raspberrypi.local
Bad value for option -c.

ssh [email protected]
[email protected]: Permission denied (publickey).

I'm at a bit of a loss as to where to go from here and was wondering if I could get some direction.

Thank you.
Attachments
rasppierror.JPG
rasppierror.JPG (24.3 KiB) Viewed 51 times

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Mini ad blocking pi hole kit question

Post by adafruit_support_mike »

That means the RasPi doesn't have a correct copy of the ssh key file stored on the computer you're using to log in.

To simplify the ideas of public-key BANNED a bit, a shared password uses something like the product of two prime numbers.. let's say 11 and 17, and the product is 187.

If I tell the world, "one of my prime numbers is 11", I can still keep the 17 secret, and use the value 187 to do calculations. For certain combinations of basic math and logic operations, the 17 will drop out, and I can work exclusively with the 'public' value of 11 and the 'private' value 187 to encode and decode messages.

If you happen to use the same kind of system, with 9x13=117 as your prime numbers, you can tell the world, "one of my prime numbers is 9" and keep the 117 as your private key.

If we want to share information, we can multiply our public prime numbers together to get 11x9=99, and then use the 99 to encode our messages. I can divide out the 9 to get back to my 11-and-187 calculations, and you can divide out the 11 to get back to your 9-and-117 calculations, but nobody else can read the messages encoded with the value 99.

ssh uses that same idea to authenticate logins. You save a copy of your public key file on the computer you want to log into, and the public/private key pair on the computer you use to log in, and the ssh daemon can generate a message that proves the computer you use to log in does in fact know your private key.

If the computer you use to log in doesn't have a public/private key pair at all, the ssh daemon usually falls back to a standard "type in your password" login. The error you're getting usually means the computer has a public/private key pair, but the values don't match the public key stored on the computer you're trying to long into.

ssh keys usually live in a folder in your home directory named '.ssh', and the public key is usually named 'id-rsa.pub', which means it's a public key for the RSA encryption protocol. you need to copy the contents of that id-rsa.pub file into a file named ~/.ssh/authorized-keys on the RasPi for ssh logins to work.

To repeat the statement above with more specific detail, the error means the contents of the RasPi's ~/.ssh/authorized-keys probably doesn't match the contents of ~/.ssh/id-rsa.pub on the computer you're using to log in.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”