Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Permission problems with SSH
Ssh is very picky about permissions on the ~/.ssh directory and files. Sometimes you may do something to mess up these permissions. Run the following to fix most permissions problems. You may have to do this on both the remote host and local host.
SSH will not work correctly and will send warnings to the log facilities if any variation of g+w or o+wexists on the $HOME directory
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment