`WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0644 for '~/.ssh/id_ed25519' are too open.`
BeginnerTroubleshootingAuthentication and Remote Access
Answer
Likely causes → The private key is readable by other users, so SSH refuses to use it.
Diagnose → ls -l ~/.ssh.
Fix →
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
On WSL, files under /mnt/c cannot hold Unix modes; copy the key into the Linux home directory.
Prevent → Create keys with ssh-keygen in the proper directory and never share private keys.
More on Authentication and Remote Access
`[email protected]: Permission denied (publickey).` followed by `fatal: Could not read from remote repository.`Beginner`remote: Support for password authentication was removed on August 13, 2021.`Beginner`fatal: Authentication failed for 'https://github.com/org/repo.git/'` with a token that worked last month.Beginner`WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!` when connecting to GitHub over SSH.Intermediate`remote: Repository not found.` for a repo you can open in the browser.Beginner`ssh -T [email protected]` says "Hi someone-else!" but you need your work account.Intermediate