SSH |> Setup SSH for GitHub or other similar services
Open your terminal
Generate new SSH key
ssh-keygen -t rsa -b 4096 -C "email@example.com"
terminal will prompt:
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
Most ssh key are stored under /Users/you/.ssh directory, unless you understand what you are doing.
id_rsa is the default private key used in SSH connection.
If you find this file already exists, then you can choose another name or type
y to overwrite the file (BE CAREFUL: you may affect softwares rely on this file).
If you change the file name, type in something like
type a secure passphrase (add an extra layer of security)
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
Add to your service account keys list
In your terminal
copy content from
/Users/you/.ssh/your_choosen_name_rsa.pub and paste to ssh key list in your service accout setting (like https://github.com/settings/ssh/new).
Add to SSH Agent
Start the ssh-agent in the background.
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/your_choosen_name_rsa (add key to keychain)
Test your ssh key setting
ssh -T firstname.lastname@example.org
If everything goes well, your will see:
Hi YOUR_GITHUB_NAME! You’ve successfully authenticated, but GitHub does not provide shell access.