Host *Īdd your SSH private key to the ssh-agent. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup. Open your ~/.ssh/config file, then modify the file to contain the following lines. If the file doesn't exist, create the file. > The file /Users/ you/.ssh/config does not exist. If you're using macOS Sierra 10.12.2 or later, you will need to modify your ~/.ssh/config file to automatically load keys into the ssh-agent and store passphrases in your keychain.įirst, check to see if your ~/.ssh/config file exists in the default location. For example, you may need to use root access by running sudo -s -H before starting the ssh-agent, or you may need to use exec ssh-agent bash or exec ssh-agent zsh to run the ssh-agent. $ eval "$(ssh-agent -s)"ĭepending on your environment, you may need to use a different command. When you're prompted to "Enter a file in which to save the key," press Enter. > Generating public/private algorithm key pair.
$ ssh-keygen -t rsa -b 4096 -C " creates a new SSH key, using the provided email as a label.
For more information, see the OpenSSH 8.2 release notes.
You must connect your hardware security key to your computer when you authenticate with the key pair. If you want to use a hardware security key to authenticate to GitHub AE, you must generate a new SSH key for your hardware security key. For more information, see " Checking for existing SSH keys." If you're unsure whether you already have an SSH key, you can check for existing keys. If you don't already have an SSH key, you must generate a new SSH key to use for authentication.