tareq3
2/22/2019 - 4:00 PM

ssh_with_bash

How to generate a ssh key

ssh-keygen

It will ask for file. Here if you want to use the default name press enter

else you can add the file name with path: like

/c/Users/mtita/.ssh/id_rsa_github

after that you can add pass phrase default should be fine

If you want to use that in github

1. add the pub key into github

cat ~/.ssh/id_rsa_github.pub

If multiple ssh key generated then follow following two steps:

give your pub key access

 eval $(ssh-agent -s)

give the key an identity

 ssh-add ~/.ssh/id_rsa_github

Second-Way

2. then add the private key into your machine for making communication

ssh-add ~/.ssh/id_rsa_github

if it fails

ssh-agent -s
ssh-agent bash

then try to add the ssh private key again

ssh-add ~/.ssh/id_rsa_github

For checking connection established or not?

ssh -vT git@github.com