Skip to content

Instantly share code, notes, and snippets.

@Ph3nol
Last active June 23, 2018 13:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ph3nol/33cafc1b5a168aa98b1e to your computer and use it in GitHub Desktop.
Save Ph3nol/33cafc1b5a168aa98b1e to your computer and use it in GitHub Desktop.
How to generate a dedicated SSH key

Generate a dedicated SSH key

SSH key creation

This is an example for a personal MacbookAir, to connect github.com.

ssh-keygen -t rsa -f ~/.ssh/id_rsa,github.com -C "github,macbookair_perso"
chmod 600 ~/.ssh/id_rsa,github.com

Then in ~/.ssh/config:

Host github.com
  Hostname github.com
  User mon_compte_github
  IdentityFile ~/.ssh/id_rsa,github.com

Others

Test SSH key

ssh -vT git@github.com

Reset passphrase

ssh-keygen -f ~/.ssh/id_rsa,github.com -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment