Fix "Permissions too open" on SSH Private Keys
Set owner-only permissions on your SSH private key with chmod 600 so ssh will use it and other users can't read it.
01Command
$ chmod 600 ~/.ssh/id_ed25519 && ls -l ~/.ssh/id_ed2551902What it does
SSH refuses to use a private key that other users on the system could read — this is deliberate, because a world-readable key is effectively leaked. chmod 600 gives only the owner read/write access; the .ssh directory itself should be 700 and the matching .pub file can stay 644. If you manage several keys, apply the same fix to every private file in ~/.ssh, and never relax these permissions again — warnings like "UNPROTECTED PRIVATE KEY FILE" always mean the mode is too open.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ssh(1) — Linux manual page (private key permissions)Evidence: ssh refuses to load identity files that are readable by others, requiring owner-only permissions on private keys.
- chmod(1) — Linux manual pageEvidence: Documents numeric modes such as 600 (owner read/write only) for restricting file access.
Last verified: 2026-09-18 · Category: Security & Privacy
06Related solutions
Generate a modern Ed25519 public/private key pair in ~/.ssh for authenticating to servers and Git platforms without passwords.
Add or remove read, write, and execute permission for the owner, group, or others using symbolic or octal modes.
Add a UFW rule to permit inbound traffic on a TCP or UDP port, such as SSH on port 22.