Sorry, I didn't spot the typo.Make sure to use <username>@localhost, not <username>@localhos
Im still getting the same error.
The file on my Pi is id_ed25519.pub so thats what I used. ( I tried id-ed25519.pub but it doesn't find the file).
Do you actually have an authorized_keys file and if you do is it empty? Or does it have keys you don't need to keep in there?
And have you actually generated a key pair for that user on the Pi? If you haven't $HOME/.ssh let alone $HOME/.ssh/authorized_keys won't yet exist.
It's just a text file so you could try the following:
- If required, backup any existing $HOME/.ssh/authorized_keys file.
- to get back to your home directory, assuming that's where your key file is.
Code:
cd - mv is move but you could use cp (copy) if you prefer.
Code:
mv id_ed25519.pub .ssh/authorized_keys - Makes sure only the owner can write to it. If others can ssh won't use it.
Code:
chmod 644 .ssh/authorized_keys
Statistics: Posted by thagrol — Wed Nov 05, 2025 1:10 am
