mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

Category: VPS Management

mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys

Create the SSH key directory with correct permissions for a new user

SSH requires exact permissions on ~/.ssh and authorized_keys. If these permissions are wrong, SSH silently ignores the keys and falls back to password auth.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.