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:
- Erased the microSD via disk utility
- BalenaEtched raspberry pi OS from raspberry pi website onto the microSD
- Safely eject microSD from comp
- Insert into raspberry pi 4, connect power
- 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)
- Ping the IP address... receive successful pings
- Attempt
ssh pi@<ip address>
- Get error 'port 22: connection refused'
- Turn off raspberry pi
- Unplug microSD from pi, reconnect to computer
- 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
- Verify ssh file exists
- Eject via
diskutil eject /dev/diskX
- Insert into raspberry pi
- Repeat steps 4-7
- 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.
- Delete the line from my known_hosts file at `~/.ssh/known_host
- Attempt again to
ssh pi@<ip address>
- 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])?
- Assume this is referring to my creation of the ssh file in microSD, say 'yes'
- 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:
- Input 'raspberry' as the password
- Get
permission denied, please try again
error
No idea what I am doing wrong here.
ssh
on macOS to avoid these. You post seems to conflate macOS errors and Pi response.ssh -vvv pi@<ip address>