I am trying to set up a headless raspberry pi 4 so that I can ssh into it via my computer. To set it up, I did the following:

  1. Erased the microSD via disk utility
  2. BalenaEtched raspberry pi OS from raspberry pi website onto the microSD
  3. Safely eject microSD from comp
  4. Insert into raspberry pi 4, connect power
  5. Wait for raspberry pi IP to show up on ip scanner (interestingly, always fails upon first open, causing me to quit and restart ip scanner)
  6. Ping the IP address... receive successful pings
  7. Attempt ssh pi@<ip address>
  8. Get error 'port 22: connection refused'
  9. Turn off raspberry pi
  10. Unplug microSD from pi, reconnect to computer
  11. Navigate to microSD and touch empty 'ssh' file at root directory; my understanding is that this should enable ssh to be set up on boot
  12. Verify ssh file exists
  13. Eject via diskutil eject /dev/diskX
  14. Insert into raspberry pi
  15. Repeat steps 4-7
  16. Receive following error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:<string>. Please contact your system administrator. Add correct host key in /Users/<username>/.ssh/known_hosts to get rid of this message. Offending ED25519 key in /Users/<username>/.ssh/known_hosts:1 Host key for <piipaddress> has changed and you have requested strict checking. Host key verification failed.
  17. Delete the line from my known_hosts file at `~/.ssh/known_host
  18. Attempt again to ssh pi@<ip address>
  19. Receive following warning: The authenticity of host '<ip address> (<ip address>)' can't be established. ED25519 key fingerprint is SHA256:<string>. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])?
  20. Assume this is referring to my creation of the ssh file in microSD, say 'yes'
  21. Receive following warning: Warning: Permanently added '<ip address>' (ED25519) to the list of known hosts. Please note that SSH may not work until a valid user has been set up.See http://rptl.io/newuser for details. pi@<ip address>'s password:
  22. Input 'raspberry' as the password
  23. Get permission denied, please try again error

No idea what I am doing wrong here.

  • Most of this is error messages from macOS - nothing to do with the Pi. You can configure ssh on macOS to avoid these. You post seems to conflate macOS errors and Pi response.
    – Milliways
    Commented Aug 14, 2023 at 3:53
  • @Milliways "You can configure ssh on macOS to avoid these." - And you absolutely shouldn't. Those messages are important security warnings that exist for good reasons.
    – marcelm
    Commented Aug 14, 2023 at 11:35
  • @marcelm I agree, but if you set everything up correctly you never see them. There is no need for strict host checking on a local network with only your own machines. The Pi is unique in the way fresh OS installs generate new keys. The real point is that the OP seemed to think these were Pi problems.
    – Milliways
    Commented Aug 14, 2023 at 11:50
  • @Milliways Right, I read "avoid" more as "disable" or "silence" in your previous comment, which is why I felt compelled to react. I agree with proper set-up you wouldn't see these messages.
    – marcelm
    Commented Aug 14, 2023 at 12:42
  • You can get more information by running ssh -vvv pi@<ip address> Commented Aug 14, 2023 at 12:44

2 Answers 2


Most of what you have done is unnecessary but should work however current Raspberry Pi OS DO NOT have a default user nor ssh enabled. The current setup process is different.

You need to boot the Pi and create a user then enable ssh.

If you really want to setup headless you need to use the RaspberryPi Imager and follow the instructions to configure a user & ssh.

  • I assumed that by this you meant clicking the gear icon in the piimager and configuring the ssh account there? If so, is it possible to install umbrel node with this set up? Via piiamger with umbrel node download, still configuring the ssh int he same way?
    – Runeaway3
    Commented Aug 14, 2023 at 3:35
  • Whatever "umbrel node" may be is unclear but detail belongs in your question - not Comments.
    – Milliways
    Commented Aug 14, 2023 at 3:40

As the link http://rptl.io/newuser (redirecting to https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/) provided by your raspberry shows, the Raspberry Pi OS no longer comes with a default user named pi (much less having a raspberry pasword). That's why you can't login with that.

You can create the user by booting graphically once, by using the RaspberryPi Imager to create an initial user, or with a file called userconf or userconf.txt in the boot partition of the SD card (likely the easiest path for you).

  • Is it possible to create this userconf file remotely, or .. ?
    – Egret
    Commented Mar 30 at 0:25
  • @Egret you can create it by mounting the SD card on another computer. You can't enable it remotely without being able to log in first.
    – Ángel
    Commented Apr 9 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.