Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7512

Beginners • Re: On/Off Switch for Raspberry Pi 4

$
0
0
Make sure to use <username>@localhost, not <username>@localhos
Sorry, I didn't spot the typo.

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).

Image

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:
  1. If required, backup any existing $HOME/.ssh/authorized_keys file.
  2. Code:

    cd
    to get back to your home directory, assuming that's where your key file is.
  3. Code:

    mv id_ed25519.pub .ssh/authorized_keys
    mv is move but you could use cp (copy) if you prefer.
  4. Code:

    chmod 644 .ssh/authorized_keys
    Makes sure only the owner can write to it. If others can ssh won't use it.

Statistics: Posted by thagrol — Wed Nov 05, 2025 1:10 am



Viewing all articles
Browse latest Browse all 7512

Trending Articles