Skip to content

Instantly share code, notes, and snippets.

@Mrkisha
Last active March 1, 2018 15:21
Show Gist options
  • Save Mrkisha/613b64e051ee8a57a04b1a2e2fa81c34 to your computer and use it in GitHub Desktop.
Save Mrkisha/613b64e051ee8a57a04b1a2e2fa81c34 to your computer and use it in GitHub Desktop.
Git specify ssh key

In ~/.ssh/config, add:

host github.com
 HostName github.com
 IdentityFile ~/.ssh/id_rsa_github
 User git

Verify that the permissions on IdentityFile are 400.SSH will reject, in a not clearly explicit manner, SSH keys that are too readable. It will just look like a credential rejection. The solution, in this case, is:

chmod 400 ~/.ssh/id_rsa_github

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment