97 Words

Permissions for SSH files

WhatPathchmodResult
SSH folder~/.ssh700drwx------
Public key~/.ssh/id_ed25519.pub644-rw-r--r--
Private key~/.ssh/id_ed25519600-rw-------
Authorized keys~/.ssh/authorized_keys600-rw-------
Config~/.ssh/config600-rw-------

Home folder

Your home folder must not be writable by others, or SSH will refuse your keys. 755 (drwxr-xr-x) is the most it may be:

chmod g-w,o-w ~

The same goes for every other key you have, such as ~/.ssh/id_rsa (older RSA keys) or ~/.ssh/yubikey: private keys 600, public keys 644. Set it all at once:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chmod 644 ~/.ssh/*.pub