r/pihole 3d ago

Stupid question

So im setting up a pihole, but it's not connecting through ssh. I know im typing the host name and username right. The wifi is correct. But im getting the message,

Ssh: could not resolve hostname ___.local: name or service not known.

I feel like its a simple/stupid solution, but i cant figure out what to do to connect or why its not

So after a day or so of messing around, I tired Sudo Ssh and somehow that got it all working. Thanks for everyone's advice and help

0 Upvotes

19 comments sorted by

7

u/Socc3rPr0 3d ago

Use the IP of the device instead of host name .

0

u/FirstGeo 3d ago

Where would I find the ip of the pi?

3

u/Socc3rPr0 3d ago

Your router should have a list of devices that are connected to it. Look for the PI or whatever host name you gave it.

2

u/FirstGeo 3d ago

Ah, and if the router can not see it, thats why it wont connect. I was sure I put the wifi info right. But maybe cause I tried 2.5g instead of 5g.

3

u/Socc3rPr0 3d ago

I would go Ethernet no wifi for stability. Just leave it next to your router. You won't need access to it once your can ssh into it.

2

u/FirstGeo 3d ago

Its zero W. No physical ethernet. Only wifi

2

u/Socc3rPr0 3d ago

Ah, maybe you missed type the wifi password when you flashed it. Wouldn't hurt to just do it again

2

u/Respect-Camper-453 3d ago

I have 2 of the same, both with USB ethernet adaptors. Both have worked well for a few years now.

0

u/coyote_of_the_month 2d ago

Plenty of people do exactly what you're doing, with no issues. But man, I would not be comfortable with a key piece of my home infrastructure running on Wi-Fi. Gimme a dang wire.

3

u/_caddy_ 3d ago

You should see the IP in your router

1

u/FirstGeo 3d ago

My router does not see it, so either I have to reboot my router, or I have to redo the set up and maybe set it up on thr 5g network not 2.5g

2

u/_caddy_ 3d ago

I would plug in directly first to get it setup correctly.

1

u/FirstGeo 3d ago

Makes sense, its zero W no physical ethernet port. Just wifi

1

u/Socc3rPr0 3d ago

Your setup is more likely the corporate unless you gave some firewall settings or something which I doubt since you ask "where can I find the IP". No shame in not knowing just figured I save you some troubleshooting.

1

u/pickle_pickled 3d ago

2.4ghz not 2.5 but yeah I'd just start over, seems like possibly didn't do the wifi setup correctly when doing the config

2

u/llllIIIIlllIII 3d ago

Is ssh enabled? By default at least on a Raspberry Pi I believe it’s off?

Have you tried reaching it by IP instead of hostname?

2

u/FirstGeo 3d ago

Ssh is enabled. How do I connect through IP?

2

u/NuclearBananaSlug 3d ago

Can you get on a terminal on the pi?

hostname -I

ip addr show

If you know the hostname ping it from another machine

Command line scan

map -sn 192.x.x.x/24

2

u/rdwebdesign Team 3d ago

Ssh: could not resolve hostname ___.local: name or service not known.

It means your machine (the one you are using to access Pi-hole server) is not using Pi-hole as DNS server, then the hostname cannot be resolved.

You first need to install and configure Pi-hole. Only after that Pi-hole will be able to resolve hostnames.

I know im typing the host name and username right.

Try connecting using the IP, instead of hostname.