Skip to content

Instantly share code, notes, and snippets.

@WhonderWy
Forked from grenade/01-generate-ed25519-ssh-key.sh
Last active February 25, 2021 08:18
Show Gist options
  • Save WhonderWy/67a1e44903dc1e21a193bde1ce05f3a0 to your computer and use it in GitHub Desktop.
Save WhonderWy/67a1e44903dc1e21a193bde1ce05f3a0 to your computer and use it in GitHub Desktop.
Correct file permissions for ssh keys and config.
ssh-keygen -t ed25519 -a 100
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
chmod 600 ~/.ssh/id_*
chmod 644 ~/.ssh/*.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment