Initial setting up of raspberry 3b headless

I followed the headless set up steps in the Core guide. In PuTTY I set up a new user name. When I ran PuTTY it asked for a password. The default password did not work and I had not entered a new one in sudo (if I was supposed to - the Core guide does not mentioning doing this). I cleared the SD card and loaded raspbian again. Now when I enter the default username in PuTTY it says “Host does not exist”. I tried the troubleshooting suggestions in the Core guide and ran ipconfig / flushdns but that returned a whole lot of messages that didn’t help me one bit. Any suggestions on how to get this working as it is supposed to?

Hi Lester,

To start with, which guide are you following? (There’s a couple similar ones on our site so I’d like to be sure)
I usually find the hardest step to be setting up the networking properly and finding the IP address. we have a guide on setting up WiFi without a screen and keyboard, or if you’re using Ethernet it should just work when you plug it in.

I use Zenmap (an nmap GUI) to find my Pi when I’ve lost it, but you can check what IP it’s on using your router setup tools, or trying raspberypi.local as the IP (if everything in the chain supports Bonjour)

Keen to see you get it up and running!
-James

1 Like

Hi James, I am using the guide for Pi Zero W Headless. I’m pretty sure Putty found the IP address properly as I was able to log in the first time on the default username and password. Things went awry when I changed the default username. A significant problem for me is that I’m “learning by doing”, with no prior skills in this area…just following the dots! Cheers

Hi Lester,

Hmm if you’ve reset your Pi back to defaults with a fresh image, it should be back to the standard pi and raspberry. Try just the IP with no username attached in PuTTY and see if you get prompted to enter a username (should be the first step when connecting).

-James

2 Likes

Hey David,

I’d suggest running ifconfig on your Pi, and in the wlan0 section which is printed to your terminal window grab the ipv4 address (i.e. the IP address for the Pi on the local network) and use that rather than your hostname in PuTTY, depending on your OS the hostname for your Pi may not be what you expect it to be, or if you’ve got more than one, the Pi that you’re trying to connect to via SSH may not be the Pi you’re expecting.

Did you leave all of the settings in PuTTY as default when setting it up?

1 Like

Thanks Bryce, yes to your last question. I’ve got a few things to try now so I’ll see how I go. I’m trying on my laptop. Windows 10. Cheers

2 Likes

Hi James, I decided that I would start again and clear the SD card and reload raspbian. This time when running the imager I got a message “error removing existing partitions”. Is there an easy fix to this? NB. I have saved the folder “overlays” onto my hard disk - just in case!

Thanks

Hi Lester,

Usually for this one you can either use the SD Formatter tool, or head into Disk Management (on windows) and remove the partitions from there.

Let me know how this goes and make sure you don’t remove any partitions on your local drives!
-James

1 Like

I’ll do that. Presumably I have to reinstall the “overlay” folder after the SD is wiped?

2 Likes

Answered my own question. The Overlay folder re-appeared after instaling raspbian.

2 Likes

Sorry guys, I’ve run into a brick wall here. I’ve wiped the SD card again, reinstalled raspbian and still get “host not found” message, including with raspberrypi.local and on a blank entry. When I enter the IP address I get a putty window but says it is inactive and an error message “connection refused”.

Sorry to say but my skills don’t run to using nmap or the suggestion about " running ifconfig on your Pi, and in the wlan0 section which is printed to your terminal window grab the ipv4 address (i.e. the IP address for the Pi on the local network)".
Thanks anyway. Cheers

Hi Lester,

Connection Refused Usually means PuTTY could reach the Pi, but was refused connection on the SSH port (22). You must place a file named ssh (no extension) into the boot partition of your pi (the one accessible from windows, in order to enable ssh and open the port.

This is covered in our guide to headless Pi use if you need some clarification:

Keen to see how you go!
-James

1 Like

Thanks James. I checked that I had an ‘ssh’ with no extension and I had. Still no luck I’m afraid. Cheers

1 Like

Hi Lester,

Sorry for leading you in circles here, I can see that you started on this guide and this is a deeper issue.

We’ll keep looking into this but I’m a little stumped :frowning:

-James

1 Like

Me too! thanks for spending time on this. If all else fails I’m going to get an hdmi cable when the Brissie lockdown is over!

1 Like

I notice in my Windows settings that “open ssh authentication agent is disabled”. Would that make any difference? Thanks

1 Like

Hi Lester,

That shouldn’t do much if you’re using PuTTY, it should work out of box if your OS, ssh port, and network are functional.

Just to confirm, you’re using the IP address of your Pi in PuTTY, you can see the Pi in your router configuration, you’ve got the ssh file (no extension) in the boot partition, and you still see connection refused? Is there any chance you’re connecting to another appliance in your house that is (understandably) refusing the connection?

Once again, pretty stumped on this one, but if you could confirm you’ve done those things I’ll look deeper into this hole
-James

Thanks James, I don’t know how to check the router configuration. Is there an easy explanation? I have been using the IP addess of my router for PuTTY. Is this correct. I managed to find out how to do an ipconfig but there was no mention of the pi.

Hi Lester,

Ah, I think we’ve stumbled upon the solution. Your router has an IP address, but it doesn’t redirect that to your Pi or anything like that, it uses it for hosting a webpage to configure it. So you’ve got 2 ways to go here:

  • Download Zenmap and run a Quick Scan with your router’s IP followed by /24
  • Log into your router by entering the router’s IP into a web browser and entering the credentials (usually written on the back of the router) and look for anything that lists the connected devices

If it doesn’t show up there, you likely haven’t configured WiFi correctly on the Pi, or maybe something is faulty.

Keen to see how this goes for you
-James

1 Like

Managed to do both things. The router info was easier for me to understand. There were a number of things that were “Device name unknown” (haven’t yet figured out what they are yet) but nothing bearing any raspberry type name. Should it be identifiable that way or any particular way?

If I haven’t configured the wifi correctly, is there a way to fix that? Cheers

2 Likes