Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

On macOS, Linux, and other Unix-like systems that use POSIX permissions, restrict the private key so only its owner can read and write it: chmod 600 /path/to/private_key. Replace the example path with the actual identity file SSH is using. OpenSSH ignores a private key file that is accessible by others, so making it more permissive is not a fix.

What the “permissions too open” warning means

OpenSSH checks that a private identity file is protected from access by other users. Its ssh(1) manual says it “will simply ignore a private key file if it is accessible by others.” The warning is therefore a security check: the client may refuse to use that identity, rather than authenticate with it.

The remedy is usually to restrict access to the existing private key. This warning alone does not mean the key must be replaced or regenerated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix the private key on macOS, Linux, or another Unix-like system

1. Identify the exact private-key file

Common filenames include ~/.ssh/id_ed25519 and ~/.ssh/id_rsa, but SSH can use a custom path. Check the command’s -i option or the relevant IdentityFile setting, and make sure you are changing the identity file actually being offered. Do not assume a similarly named file is the one causing the warning.

#1 Best Overall
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

A matching filename ending in .pub is generally the public key, which is shared with the server. The private key is the credential you must protect; see the OpenSSH manual’s description of identity files and public-key authentication.

2. Inspect and restrict its permissions

Use ls -l to inspect the file, then set the private key to owner read/write only:

Rank #2
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
ls -l /path/to/private_key
chmod 600 /path/to/private_key

In POSIX mode 600, the owner can read and write the file; group and other users have no access. This matches the OpenSSH requirement that the key be readable by its owner but inaccessible to others. Use the same actual path in both commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not use chmod 777 or grant broad read access to make the warning disappear. Those settings weaken the protection OpenSSH is checking.

3. Check the parent directory and ownership if the warning remains

If the private key is restricted but SSH still complains, inspect the containing .ssh directory and confirm the key belongs to the account that is using it. OpenBSD’s ssh(1) manual recommends that the .ssh directory be accessible to its owner and inaccessible to others. It also says the SSH configuration file must not be writable by others; that is a related check, not a reason to change unrelated files blindly.

If you use ssh-agent

ssh-add loads private-key identities into ssh-agent, and it has its own access check: its manual says identity files should not be readable by anyone but the user and that it ignores files accessible by others. See OpenBSD’s ssh-add(1) manual.

If direct SSH login works but adding a key to the agent fails, verify that ssh-add is receiving the same private-key path you corrected. A different identity file can have different permissions.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Windows permissions are a separate case

The chmod 600 instructions apply to Unix-style POSIX file permissions. Windows OpenSSH may rely on access-control lists (ACLs), and the exact correction can depend on the Windows release, filesystem, and account setup. Do not treat the Unix command as a universal Windows fix; use instructions verified for the specific Windows environment and SSH client involved.

Best Value
Yubico - YubiKey 5Ci - Multi-Factor authentication (MFA) Security Key and passkey for iPhone/Android/PC, Dual connectors for Lighting/USB-C, FIDO Certified
  • POWERFUL SECURITY KEY: The YubiKey 5 is a versatile physical passkey that protects your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 secures 100+ of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 via USB and tap it to authenticate. No batteries, no internet connection, and no extra fees required.
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Keep the private and public keys distinct

The public key is provided to the server for authentication; the private key remains with the user and must be protected. The “private key accessible by others” warning concerns the private identity file, not the public key. That distinction does not mean public-key files or their directories should be made writable by everyone.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.