Adding a new SSH key to your GitHub account for macOS Sierra 10.12.2 or later
Post header photo

There two steps to configure our GitHub account to use a new SSH key. -1 Generate a new SSH key on our local computer and add it to the local ssh-agent. -2 Add the new SSH key to the GitHub account. Generating a new SSH key: $ ssh-keygen -t rsa -b 4096 -C "" Adding your SSH key to the ssh-agent: $ eval "$(ssh-agent -s)" modify your ~/.ssh/config with Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa Add your SSH private key to the ssh-agent and store your passphrase in the keychain $ ssh-add -K ~/.ssh/id_rsa Copy the contents of the file (SSH key) to the clipboard $ pbcopy < ~/.ssh/ Paste the copied SSH key in the clipboard in the GitHub, Settings, SSH and GPG keys, as a new SSH key. (Title is only a description)