Interview Prep/Linux/Networking, SSH & Scheduling

Why do SSH key permissions matter?

IntermediateConceptNetworking, SSH & Scheduling
Answer

sshd's StrictModes yes (default) refuses keys if the home directory, ~/.ssh or authorized_keys is writable by others, and ssh refuses a private key readable by others ("UNPROTECTED PRIVATE KEY FILE").

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
All Linux questions Roadmap: Linux

More on Networking, SSH & Scheduling