Last active
March 4, 2023 03:53
-
-
Save gaborpinterweb/73fdf4ae0d5deaf748b8321bff80a666 to your computer and use it in GitHub Desktop.
ssh key and ssh-agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // 1. Check if SSH already exists | |
| type %userprofile%\.ssh\id_rsa.pub // Windows command line | |
| cat ~/.ssh/id_rsa.pub // GNU/Linux/Mac/PowerShell: | |
| // 2. Generating new ssh key | |
| ssh-keygen -t rsa -b 4096 -C "your_email@example.com" // or | |
| ssh-keygen -t rsa -C "gaboratorium@gmail.com" | |
| // 3. Turn on SSH agent | |
| eval "$(ssh-agent -s)" | |
| // 4. Add ssh key to ssh agent | |
| ssh-add ~/.ssh/id_rsa | |
| // 5. Add your ssh key to your git repo provider (GitHub, GitLab...) | |
| // X. If you want to change the password of your key later, you can use the following command: | |
| ssh-keygen -p <keyname> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment