An Interest In:
Web News this Week
- April 17, 2024
- April 16, 2024
- April 15, 2024
- April 14, 2024
- April 13, 2024
- April 12, 2024
- April 11, 2024
January 29, 2023 01:53 pm GMT
Original Link: https://dev.to/shulyavraham/ssh-key-pair-3ij8
SSH Key Pair
SSH-Key
Accessing a remote repository via SSH without the need to provide username and password every time I pull or push.
- Go to your command line prompt (e.g. the GitHub CLI installed previously), and run:
ssh-keygen
Use the same command for Windows, only with .exe extension.
- Just hit Enter for each of the questions asked...
- It will generate a
.ssh/
directory in your home dir with key-pair inside, in the form of 2 files:id_rsa
- is the private key - which I always keep locally on my computerid_rsa.pub
is the public key - which I can publish somewhere on the internet
ls ~/.ssh
- View and copy the contents of
id-rsa.pub
(depending on the OS you're using, use the appropriate editor or file viewer, here I will use Linux commandcat
orless
. On Windows one might use Notepad).
cat ~/.ssh/id-rsa.pub
- Copy the file content
- Go back to your GitHub account page: Click
Setting
->SSH and GPG keys
->New SSH key
->paste the public key into theKey
text box, provide someTitle
->Add SSH key
. - Once this is done, I will not need to provide my username and password every time I communicate with the remote repo.
Original Link: https://dev.to/shulyavraham/ssh-key-pair-3ij8
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To