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. To do so, type the default file location and replace id_ssh_keyname with your custom key name. Please note that if you created SSH keys previously, ssh-keygen may ask you to rewrite another key, in which case we recommend creating a custom-named SSH key. When you're prompted to "Enter a file in which to save the key", you can press Enter to accept the default file location. > Generating public/private ALGORITHM key pair. $ ssh-keygen -t rsa -b 4096 -C ssh-keygen -t rsa -b 4096 -C creates a new SSH key, using the provided email as a label. Paste the text below, substituting in your GitHub AE email address. After you generate the key, you can add the key to your account on GitHub AE to enable authentication for Git operations over SSH. You can generate a new SSH key on your local machine. 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. The SSH agent manages your SSH keys and remembers your passphrase. If your key has a passphrase and you don't want to enter the passphrase every time you use the key, you can add your key to the SSH agent. Whenever you use the key, you must enter the passphrase. ![]() When you generate an SSH key, you can add a passphrase to further secure the key. When you connect via SSH, you authenticate using a private key file on your local machine. You can access and write data in repositories on GitHub AE using SSH (Secure Shell Protocol).
0 Comments
Leave a Reply. |